From 31ed7ffb35f2231515aed8fe5f54d98e587504b9 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 20 Dec 2022 21:56:51 +0000 Subject: [PATCH 1/2] feat: Support AttachedClusters feat: Add errors output fields for cluster and nodepool resources feat: Add AWS Autoscaling Group metrics collection for AWS nodepools feat: Add monitoring config Clients can now (1) manage Attached Clusters, (2) use managed GMP metrics collection, (3) enable AWS nodepool ASG metrics collection, and (4) get error summary from API resources. PiperOrigin-RevId: 496709757 Source-Link: https://github.com/googleapis/googleapis/commit/8e3a5a476e5cd6bc2065dabb87838a0e19949885 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d5c060f1ec865af727d70e2611ff806fd504cbb5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZW11bHRpY2xvdWQvLk93bEJvdC55YW1sIiwiaCI6ImQ1YzA2MGYxZWM4NjVhZjcyN2Q3MGUyNjExZmY4MDZmZDUwNGNiYjUifQ== --- .../v1/.eslintignore | 7 + .../v1/.eslintrc.json | 3 + .../google-cloud-gkemulticloud/v1/.gitignore | 14 + .../google-cloud-gkemulticloud/v1/.jsdoc.js | 55 + .../google-cloud-gkemulticloud/v1/.mocharc.js | 33 + .../v1/.prettierrc.js | 22 + .../google-cloud-gkemulticloud/v1/README.md | 1 + .../v1/linkinator.config.json | 16 + .../v1/package.json | 66 + .../gkemulticloud/v1/attached_resources.proto | 230 ++ .../gkemulticloud/v1/attached_service.proto | 432 ++ .../gkemulticloud/v1/aws_resources.proto | 627 +++ .../cloud/gkemulticloud/v1/aws_service.proto | 605 +++ .../gkemulticloud/v1/azure_resources.proto | 688 ++++ .../gkemulticloud/v1/azure_service.proto | 773 ++++ .../gkemulticloud/v1/common_resources.proto | 174 + ...tached_clusters.create_attached_cluster.js | 88 + ...tached_clusters.delete_attached_cluster.js | 95 + ...erate_attached_cluster_install_manifest.js | 89 + .../attached_clusters.get_attached_cluster.js | 67 + ...hed_clusters.get_attached_server_config.js | 67 + ...tached_clusters.import_attached_cluster.js | 90 + ...ttached_clusters.list_attached_clusters.js | 82 + ...tached_clusters.update_attached_cluster.js | 82 + .../v1/aws_clusters.create_aws_cluster.js | 88 + .../v1/aws_clusters.create_aws_node_pool.js | 89 + .../v1/aws_clusters.delete_aws_cluster.js | 87 + .../v1/aws_clusters.delete_aws_node_pool.js | 88 + .../aws_clusters.generate_aws_access_token.js | 67 + .../v1/aws_clusters.get_aws_cluster.js | 67 + .../v1/aws_clusters.get_aws_node_pool.js | 67 + .../v1/aws_clusters.get_aws_server_config.js | 67 + .../v1/aws_clusters.list_aws_clusters.js | 82 + .../v1/aws_clusters.list_aws_node_pools.js | 83 + .../v1/aws_clusters.update_aws_cluster.js | 97 + .../v1/aws_clusters.update_aws_node_pool.js | 96 + .../v1/azure_clusters.create_azure_client.js | 88 + .../v1/azure_clusters.create_azure_cluster.js | 88 + .../azure_clusters.create_azure_node_pool.js | 88 + .../v1/azure_clusters.delete_azure_client.js | 80 + .../v1/azure_clusters.delete_azure_cluster.js | 87 + .../azure_clusters.delete_azure_node_pool.js | 89 + ...re_clusters.generate_azure_access_token.js | 67 + .../v1/azure_clusters.get_azure_client.js | 68 + .../v1/azure_clusters.get_azure_cluster.js | 67 + .../v1/azure_clusters.get_azure_node_pool.js | 67 + .../azure_clusters.get_azure_server_config.js | 67 + .../v1/azure_clusters.list_azure_clients.js | 82 + .../v1/azure_clusters.list_azure_clusters.js | 82 + .../azure_clusters.list_azure_node_pools.js | 83 + .../v1/azure_clusters.update_azure_cluster.js | 87 + .../azure_clusters.update_azure_node_pool.js | 79 + ...etadata.google.cloud.gkemulticloud.v1.json | 1711 ++++++++ .../v1/src/index.ts | 29 + .../v1/src/v1/attached_clusters_client.ts | 2024 ++++++++++ .../v1/attached_clusters_client_config.json | 78 + .../src/v1/attached_clusters_proto_list.json | 9 + .../v1/src/v1/aws_clusters_client.ts | 2571 ++++++++++++ .../v1/src/v1/aws_clusters_client_config.json | 98 + .../v1/src/v1/aws_clusters_proto_list.json | 9 + .../v1/src/v1/azure_clusters_client.ts | 3098 +++++++++++++++ .../src/v1/azure_clusters_client_config.json | 118 + .../v1/src/v1/azure_clusters_proto_list.json | 9 + .../v1/src/v1/gapic_metadata.json | 435 +++ .../v1/src/v1/index.ts | 21 + .../system-test/fixtures/sample/src/index.js | 29 + .../system-test/fixtures/sample/src/index.ts | 44 + .../v1/system-test/install.ts | 49 + .../v1/test/gapic_attached_clusters_v1.ts | 2134 ++++++++++ .../v1/test/gapic_aws_clusters_v1.ts | 2799 +++++++++++++ .../v1/test/gapic_azure_clusters_v1.ts | 3460 +++++++++++++++++ .../v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + 73 files changed, 25461 insertions(+) create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/README.md create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/linkinator.config.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/package.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_resources.proto create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_service.proto create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_resources.proto create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_service.proto create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_resources.proto create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_service.proto create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/common_resources.proto create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.create_attached_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.delete_attached_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_server_config.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.import_attached_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.list_attached_clusters.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.update_attached_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_node_pool.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_node_pool.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.generate_aws_access_token.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_node_pool.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_server_config.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_clusters.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_node_pools.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_node_pool.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_client.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_node_pool.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_client.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_node_pool.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.generate_azure_access_token.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_client.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_node_pool.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_server_config.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clients.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clusters.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_node_pools.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_cluster.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_node_pool.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client_config.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_proto_list.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client_config.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_proto_list.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client_config.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_proto_list.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_attached_clusters_v1.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_aws_clusters_v1.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_azure_clusters_v1.ts create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintignore b/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintrc.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/.gitignore b/owl-bot-staging/google-cloud-gkemulticloud/v1/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/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-gkemulticloud/v1/.jsdoc.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/.jsdoc.js new file mode 100644 index 00000000000..57ece68c9c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2022 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/gkemulticloud', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/.mocharc.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/.mocharc.js new file mode 100644 index 00000000000..481c522b00f --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +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-gkemulticloud/v1/.prettierrc.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/.prettierrc.js new file mode 100644 index 00000000000..494e147865d --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/README.md b/owl-bot-staging/google-cloud-gkemulticloud/v1/README.md new file mode 100644 index 00000000000..2e8a88145db --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/README.md @@ -0,0 +1 @@ +Gkemulticloud: Nodejs Client diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/linkinator.config.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/package.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/package.json new file mode 100644 index 00000000000..d49079a276b --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/package.json @@ -0,0 +1,66 @@ +{ + "name": "@google-cloud/gkemulticloud", + "version": "0.1.0", + "description": "Gkemulticloud client for Node.js", + "repository": "googleapis/nodejs-gkemulticloud", + "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 gkemulticloud", + "gkemulticloud", + "attached clusters", + "aws clusters", + "azure clusters" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^3.5.2" + }, + "devDependencies": { + "@types/mocha": "^9.1.1", + "@types/node": "^16.11.62", + "@types/sinon": "^10.0.13", + "c8": "^7.12.0", + "gts": "^3.1.1", + "jsdoc": "^3.6.11", + "jsdoc-fresh": "^2.0.1", + "jsdoc-region-tag": "^2.0.1", + "linkinator": "^4.0.3", + "mocha": "^10.0.0", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^14.0.0", + "ts-loader": "^8.4.0", + "typescript": "^4.8.3", + "webpack": "^4.46.0", + "webpack-cli": "^4.10.0" + }, + "engines": { + "node": ">=v12" + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_resources.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_resources.proto new file mode 100644 index 00000000000..4c8f6ab475e --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_resources.proto @@ -0,0 +1,230 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/common_resources.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AttachedResourcesProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// An Anthos cluster running on customer own infrastructure. +message AttachedCluster { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AttachedCluster" + pattern: "projects/{project}/locations/{location}/attachedClusters/{attached_cluster}" + }; + + // The lifecycle state of the cluster. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the cluster is being registered. + PROVISIONING = 1; + + // The RUNNING state indicates the cluster has been register and is fully + // usable. + RUNNING = 2; + + // The RECONCILING state indicates that some work is actively being done on + // the cluster, such as upgrading software components. + RECONCILING = 3; + + // The STOPPING state indicates the cluster is being de-registered. + STOPPING = 4; + + // The ERROR state indicates the cluster is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Cluster names are formatted as + // `projects//locations//attachedClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1; + + // Optional. A human readable description of this cluster. + // Cannot be longer than 255 UTF-8 encoded bytes. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. OpenID Connect (OIDC) configuration for the cluster. + AttachedOidcConfig oidc_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + string platform_version = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Kubernetes distribution of the underlying attached cluster. + // + // Supported values: ["eks", "aks"]. + string distribution = 16 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The region where this cluster runs. + // + // For EKS clusters, this is a AWS region. For AKS clusters, + // this is an Azure region. + string cluster_region = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Fleet configuration. + Fleet fleet = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the cluster. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the cluster. + string uid = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently changes in flight to the cluster. + bool reconciling = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was registered. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was last updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 11; + + // Output only. The Kubernetes version of the cluster. + string kubernetes_version = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Annotations on the cluster. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Key can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Workload Identity settings. + WorkloadIdentityConfig workload_identity_config = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Logging configuration for this cluster. + LoggingConfig logging_config = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A set of errors found in the cluster. + repeated AttachedClusterError errors = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configuration related to the cluster RBAC settings. + AttachedClustersAuthorization authorization = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Monitoring configuration for this cluster. + MonitoringConfig monitoring_config = 23 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration related to the cluster RBAC settings. +message AttachedClustersAuthorization { + // Required. Users that can perform operations as a cluster admin. A managed + // ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + // to the users. Up to ten admin users can be provided. + // + // For more info on RBAC, see + // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + repeated AttachedClusterUser admin_users = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Identities of a user-type subject for Attached clusters. +message AttachedClusterUser { + // Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + string username = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// OIDC discovery information of the target cluster. +// +// Kubernetes Service Account (KSA) tokens are JWT tokens signed by the cluster +// API server. This fields indicates how GCP services +// validate KSA tokens in order to allow system workloads (such as GKE Connect +// and telemetry agents) to authenticate back to GCP. +// +// Both clusters with public and private issuer URLs are supported. +// Clusters with public issuers only need to specify the `issuer_url` field +// while clusters with private issuers need to provide both +// `issuer_url` and `oidc_jwks`. +message AttachedOidcConfig { + // A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://`. + string issuer_url = 1; + + // Optional. OIDC verification keys in JWKS format (RFC 7517). + // It contains a list of OIDC verification keys that can be used to verify + // OIDC JWTs. + // + // This field is required for cluster that doesn't have a publicly available + // discovery endpoint. When provided, it will be directly used + // to verify the OIDC JWT asserted by the IDP. + bytes jwks = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// AttachedServerConfig provides information about supported +// Kubernetes versions +message AttachedServerConfig { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AttachedServerConfig" + pattern: "projects/{project}/locations/{location}/attachedServerConfig" + }; + + // The resource name of the config. + string name = 1; + + // List of valid platform versions. + repeated AttachedPlatformVersionInfo valid_versions = 2; +} + +// Information about a supported Attached Clusters platform version. +message AttachedPlatformVersionInfo { + // Platform version name. + string version = 1; +} + +// AttachedClusterError describes errors found on attached clusters. +message AttachedClusterError { + // Human-friendly description of the error. + string message = 1; +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_service.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_service.proto new file mode 100644 index 00000000000..e72d3f1ab29 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_service.proto @@ -0,0 +1,432 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/attached_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AttachedServiceProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// The AttachedClusters API provides a single centrally managed service +// to register and manage Anthos attached clusters that run on customer's owned +// infrastructure. +service AttachedClusters { + option (google.api.default_host) = "gkemulticloud.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // on a given GCP project and region. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAttachedCluster(CreateAttachedClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/attachedClusters" + body: "attached_cluster" + }; + option (google.api.method_signature) = + "parent,attached_cluster,attached_cluster_id"; + option (google.longrunning.operation_info) = { + response_type: "AttachedCluster" + metadata_type: "OperationMetadata" + }; + } + + // Updates an + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + rpc UpdateAttachedCluster(UpdateAttachedClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}" + body: "attached_cluster" + }; + option (google.api.method_signature) = "attached_cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AttachedCluster" + metadata_type: "OperationMetadata" + }; + } + + // Imports creates a new + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // by importing an existing Fleet Membership resource. + // + // Attached Clusters created before the introduction of the Anthos Multi-Cloud + // API can be imported through this method. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc ImportAttachedCluster(ImportAttachedClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/attachedClusters:import" + body: "*" + }; + option (google.api.method_signature) = "parent,fleet_membership"; + option (google.longrunning.operation_info) = { + response_type: "AttachedCluster" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + rpc GetAttachedCluster(GetAttachedClusterRequest) returns (AttachedCluster) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/attachedClusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + // resources on a given Google Cloud project and region. + rpc ListAttachedClusters(ListAttachedClustersRequest) + returns (ListAttachedClustersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/attachedClusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAttachedCluster(DeleteAttachedClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/attachedClusters/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns information, such as supported Kubernetes versions, on a given + // Google Cloud location. + rpc GetAttachedServerConfig(GetAttachedServerConfigRequest) + returns (AttachedServerConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/attachedServerConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Generates the install manifest to be installed on the target cluster. + rpc GenerateAttachedClusterInstallManifest( + GenerateAttachedClusterInstallManifestRequest) + returns (GenerateAttachedClusterInstallManifestResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest" + }; + option (google.api.method_signature) = "parent,attached_cluster_id"; + } +} + +// Request message for `AttachedClusters.GenerateAttachedClusterInstallManifest` +// method. +message GenerateAttachedClusterInstallManifestRequest { + // Required. The parent location where this + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // will be created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AttachedCluster" + } + ]; + + // Required. A client provided ID the resource. Must be unique within the + // parent resource. + // + // The provided ID will be part of the + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // name formatted as + // `projects//locations//attachedClusters/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + // + // When generating an install manifest for importing an existing Membership + // resource, the attached_cluster_id field must be the Membership id. + // + // Membership names are formatted as `resource name formatted as + // `projects//locations//memberships/`. + string attached_cluster_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + string platform_version = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// `AttachedClusters.GenerateAttachedClusterInstallManifest` method. +message GenerateAttachedClusterInstallManifestResponse { + // A set of Kubernetes resources (in YAML format) to be applied + // to the cluster to be attached. + string manifest = 1; +} + +// Request message for `AttachedClusters.CreateAttachedCluster` method. +message CreateAttachedClusterRequest { + // Required. The parent location where this + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // will be created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AttachedCluster" + } + ]; + + // Required. The specification of the + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create. + AttachedCluster attached_cluster = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the + // parent resource. + // + // The provided ID will be part of the + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // name formatted as + // `projects//locations//attachedClusters/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + string attached_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the cluster. + bool validate_only = 4; +} + +// Request message for `AttachedClusters.ImportAttachedCluster` method. +message ImportAttachedClusterRequest { + // Required. The parent location where this + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // will be created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AttachedCluster" + } + ]; + + // If set, only validate the request, but do not actually import the cluster. + bool validate_only = 2; + + // Required. The name of the fleet membership resource to import. + string fleet_membership = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig]. + string platform_version = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Kubernetes distribution of the underlying attached cluster. + // + // Supported values: ["eks", "aks"]. + string distribution = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AttachedClusters.UpdateAttachedCluster` method. +message UpdateAttachedClusterRequest { + // Required. The + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // to update. + AttachedCluster attached_cluster = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually update the cluster. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]: + // + // * `description`. + // * `annotations`. + // * `platform_version`. + // * `authorization.admin_users`. + // * `logging_config.component_config.enable_components`. + // * `monitoring_config.managed_prometheus_config.enabled`. + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AttachedClusters.GetAttachedCluster` method. +message GetAttachedClusterRequest { + // Required. The name of the + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // to describe. + // + // `AttachedCluster` names are formatted as + // `projects//locations//attachedClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AttachedCluster" + } + ]; +} + +// Request message for `AttachedClusters.ListAttachedClusters` method. +message ListAttachedClustersRequest { + // Required. The parent location which owns this collection of + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AttachedCluster" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [attachedClusters.list][google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters] + // request, if any. + string page_token = 3; +} + +// Response message for `AttachedClusters.ListAttachedClusters` method. +message ListAttachedClustersResponse { + // A list of [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] + // resources in the specified GCP project and region region. + repeated AttachedCluster attached_clusters = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `AttachedClusters.DeleteAttachedCluster` method. +message DeleteAttachedClusterRequest { + // Required. The resource name the + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete. + // + // `AttachedCluster` names are formatted as + // `projects//locations//attachedClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AttachedCluster" + } + ]; + + // If set, only validate the request, but do not actually delete the resource. + bool validate_only = 2; + + // If set to true, and the + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // is not found, the request will succeed but no action will be taken on the + // server and a completed [Operation][google.longrunning.Operation] will be + // returned. + // + // Useful for idempotent deletion. + bool allow_missing = 3; + + // If set to true, the deletion of + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource + // will succeed even if errors occur during deleting in cluster resources. + // Using this parameter may result in orphaned resources in the cluster. + bool ignore_errors = 5; + + // The current etag of the + // [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided etag does not match the current etag of the cluster, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// GetAttachedServerConfigRequest gets the server config for attached +// clusters. +message GetAttachedServerConfigRequest { + // Required. The name of the + // [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] + // resource to describe. + // + // `AttachedServerConfig` names are formatted as + // `projects//locations//attachedServerConfig`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AttachedServerConfig" + } + ]; +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_resources.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_resources.proto new file mode 100644 index 00000000000..dc7e918209e --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_resources.proto @@ -0,0 +1,627 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/common_resources.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AwsResourcesProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// An Anthos cluster running on AWS. +message AwsCluster { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AwsCluster" + pattern: "projects/{project}/locations/{location}/awsClusters/{aws_cluster}" + }; + + // The lifecycle state of the cluster. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the cluster is being created. + PROVISIONING = 1; + + // The RUNNING state indicates the cluster has been created and is fully + // usable. + RUNNING = 2; + + // The RECONCILING state indicates that some work is actively being done on + // the cluster, such as upgrading the control plane replicas. + RECONCILING = 3; + + // The STOPPING state indicates the cluster is being deleted. + STOPPING = 4; + + // The ERROR state indicates the cluster is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Cluster names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1; + + // Optional. A human readable description of this cluster. + // Cannot be longer than 255 UTF-8 encoded bytes. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Cluster-wide networking configuration. + AwsClusterNetworking networking = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AWS region where the cluster runs. + // + // Each Google Cloud region supports a subset of nearby AWS regions. + // You can call + // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] + // to list all supported AWS regions within a given Google Cloud region. + string aws_region = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration related to the cluster control plane. + AwsControlPlane control_plane = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration related to the cluster RBAC settings. + AwsAuthorization authorization = 15 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the cluster. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The endpoint of the cluster's API server. + string endpoint = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the cluster. + string uid = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently changes in flight to the cluster. + bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was created. + google.protobuf.Timestamp create_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was last updated. + google.protobuf.Timestamp update_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 13; + + // Optional. Annotations on the cluster. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Key can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Workload Identity settings. + WorkloadIdentityConfig workload_identity_config = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. PEM encoded x509 certificate of the cluster root of trust. + string cluster_ca_certificate = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Fleet configuration. + Fleet fleet = 18 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Logging configuration for this cluster. + LoggingConfig logging_config = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A set of errors found in the cluster. + repeated AwsClusterError errors = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Monitoring configuration for this cluster. + MonitoringConfig monitoring_config = 21 + [(google.api.field_behavior) = OPTIONAL]; +} + +// ControlPlane defines common parameters between control plane nodes. +message AwsControlPlane { + // Required. The Kubernetes version to run on control plane replicas + // (e.g. `1.19.10-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + string version = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The AWS instance type. + // + // When unspecified, it uses a default based on the cluster's version. + string instance_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SSH configuration for how to access the underlying control plane + // machines. + AwsSshConfig ssh_config = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The list of subnets where control plane replicas will run. + // A replica will be provisioned on each subnet and up to three values + // can be provided. + // Each subnet must be in a different AWS Availability Zone (AZ). + repeated string subnet_ids = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The IDs of additional security groups to add to control plane + // replicas. The Anthos Multi-Cloud API will automatically create and manage + // security groups with the minimum rules needed for a functioning cluster. + repeated string security_group_ids = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The name or ARN of the AWS IAM instance profile to assign to each + // control plane replica. + string iam_instance_profile = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Configuration related to the root volume provisioned for each + // control plane replica. + // + // Volumes will be provisioned in the availability zone associated + // with the corresponding subnet. + // + // When unspecified, it defaults to 32 GiB with the GP2 volume type. + AwsVolumeTemplate root_volume = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to the main volume provisioned for each + // control plane replica. + // The main volume is in charge of storing all of the cluster's etcd state. + // + // Volumes will be provisioned in the availability zone associated + // with the corresponding subnet. + // + // When unspecified, it defaults to 8 GiB with the GP2 volume type. + AwsVolumeTemplate main_volume = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + AwsDatabaseEncryption database_encryption = 10 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A set of AWS resource tags to propagate to all underlying managed + // AWS resources. + // + // Specify at most 50 pairs containing alphanumerics, spaces, and symbols + // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + // 255 Unicode characters. + map tags = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Authentication configuration for management of AWS resources. + AwsServicesAuthentication aws_services_authentication = 12 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Proxy configuration for outbound HTTP(S) traffic. + AwsProxyConfig proxy_config = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Config encryption for user data. + AwsConfigEncryption config_encryption = 17 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The placement to use on control plane instances. + // When unspecified, the VPC's default tenancy will be used. + AwsInstancePlacement instance_placement = 18 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Authentication configuration for the management of AWS resources. +message AwsServicesAuthentication { + // Required. The Amazon Resource Name (ARN) of the role that the Anthos + // Multi-Cloud API will assume when managing AWS resources on your account. + string role_arn = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An identifier for the assumed role session. + // + // When unspecified, it defaults to `multicloud-service-agent`. + string role_session_name = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration related to the cluster RBAC settings. +message AwsAuthorization { + // Required. Users that can perform operations as a cluster admin. A managed + // ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + // to the users. Up to ten admin users can be provided. + // + // For more info on RBAC, see + // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + repeated AwsClusterUser admin_users = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Identities of a user-type subject for AWS clusters. +message AwsClusterUser { + // Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + string username = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration related to application-layer secrets encryption. +message AwsDatabaseEncryption { + // Required. The ARN of the AWS KMS key used to encrypt cluster secrets. + string kms_key_arn = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration template for AWS EBS volumes. +message AwsVolumeTemplate { + // Types of supported EBS volumes. We currently only support GP2 or GP3 + // volumes. + // See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html + // for more information. + enum VolumeType { + // Not set. + VOLUME_TYPE_UNSPECIFIED = 0; + + // GP2 (General Purpose SSD volume type). + GP2 = 1; + + // GP3 (General Purpose SSD volume type). + GP3 = 2; + } + + // Optional. The size of the volume, in GiBs. + // + // When unspecified, a default value is provided. See the specific reference + // in the parent resource. + int32 size_gib = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the EBS volume. + // + // When unspecified, it defaults to GP2 volume. + VolumeType volume_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of I/O operations per second (IOPS) to provision for + // GP3 volume. + int32 iops = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + // used to encrypt AWS EBS volumes. + // + // If not specified, the default Amazon managed key associated to + // the AWS region where this cluster runs will be used. + string kms_key_arn = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// ClusterNetworking defines cluster-wide networking configuration. +// +// Anthos clusters on AWS run on a single VPC. This includes control +// plane replicas and node pool nodes. +message AwsClusterNetworking { + // Required. The VPC associated with the cluster. All component clusters + // (i.e. control plane and node pools) run on a single VPC. + // + // This field cannot be changed after creation. + string vpc_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. All pods in the cluster are assigned an IPv4 address from these + // ranges. Only a single range is supported. This field cannot be changed + // after creation. + repeated string pod_address_cidr_blocks = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. All services in the cluster are assigned an IPv4 address from + // these ranges. Only a single range is supported. This field cannot be + // changed after creation. + repeated string service_address_cidr_blocks = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// An Anthos node pool running on AWS. +message AwsNodePool { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AwsNodePool" + pattern: "projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}" + }; + + // The lifecycle state of the node pool. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the node pool is being created. + PROVISIONING = 1; + + // The RUNNING state indicates the node pool has been created + // and is fully usable. + RUNNING = 2; + + // The RECONCILING state indicates that the node pool is being reconciled. + RECONCILING = 3; + + // The STOPPING state indicates the node pool is being deleted. + STOPPING = 4; + + // The ERROR state indicates the node pool is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the node pool requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Node pool names are formatted as + // `projects//locations//awsClusters//awsNodePools/`. + // + // For more details on Google Cloud resource names, + // see [Resource Names](https://cloud.google.com/apis/design/resource_names) + string name = 1; + + // Required. The Kubernetes version to run on this node pool (e.g. + // `1.19.10-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. + string version = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The configuration of the node pool. + AwsNodeConfig config = 28 [(google.api.field_behavior) = REQUIRED]; + + // Required. Autoscaler configuration for this node pool. + AwsNodePoolAutoscaling autoscaling = 25 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The subnet where the node pool node run. + string subnet_id = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The lifecycle state of the node pool. + State state = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the node pool. + string uid = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently changes in flight to the node + // pool. + bool reconciling = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this node pool was created. + google.protobuf.Timestamp create_time = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this node pool was last updated. + google.protobuf.Timestamp update_time = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 21; + + // Optional. Annotations on the node pool. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Key can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool. + MaxPodsConstraint max_pods_constraint = 27 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. A set of errors found in the node pool. + repeated AwsNodePoolError errors = 29 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Parameters that describe the nodes in a cluster. +message AwsNodeConfig { + // Optional. The AWS instance type. + // + // When unspecified, it uses a default based on the node pool's version. + string instance_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Template for the root volume provisioned for node pool nodes. + // Volumes will be provisioned in the availability zone assigned + // to the node pool subnet. + // + // When unspecified, it defaults to 32 GiB with the GP2 volume type. + AwsVolumeTemplate root_volume = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The initial taints assigned to nodes of this node pool. + repeated NodeTaint taints = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The initial labels assigned to nodes of this node pool. An object + // containing a list of "key": value pairs. Example: { "name": "wrench", + // "mass": "1.3kg", "count": "3" }. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Key/value metadata to assign to each underlying AWS resource. + // Specify at most 50 pairs containing alphanumerics, spaces, and symbols + // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + // 255 Unicode characters. + map tags = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The name or ARN of the AWS IAM role assigned to nodes in the + // pool. + string iam_instance_profile = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The OS image type to use on node pool instances. + // Can have a value of `ubuntu`, or `windows` if the cluster enables + // the Windows node pool preview feature. + // + // When unspecified, it defaults to `ubuntu`. + string image_type = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The SSH configuration. + AwsSshConfig ssh_config = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IDs of additional security groups to add to nodes in this + // pool. The manager will automatically create security groups with minimum + // rules needed for a functioning cluster. + repeated string security_group_ids = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Proxy configuration for outbound HTTP(S) traffic. + AwsProxyConfig proxy_config = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Config encryption for user data. + AwsConfigEncryption config_encryption = 13 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Placement related info for this node. + // When unspecified, the VPC's default tenancy will be used. + AwsInstancePlacement instance_placement = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to CloudWatch metrics collection on the + // Auto Scaling group of the node pool. + // + // When unspecified, metrics collection is disabled. + AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 + [(google.api.field_behavior) = OPTIONAL]; +} + +// AwsNodePoolAutoscaling contains information required by cluster autoscaler +// to adjust the size of the node pool to the current cluster usage. +message AwsNodePoolAutoscaling { + // Required. Minimum number of nodes in the node pool. Must be greater than or + // equal to 1 and less than or equal to max_node_count. + int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maximum number of nodes in the node pool. Must be greater than or + // equal to min_node_count and less than or equal to 50. + int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// AwsServerConfig is the configuration of GKE cluster on AWS. +message AwsServerConfig { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AwsServerConfig" + pattern: "projects/{project}/locations/{location}/awsServerConfig" + }; + + // The resource name of the config. + string name = 1; + + // List of valid Kubernetes versions. + repeated AwsK8sVersionInfo valid_versions = 2; + + // The list of supported AWS regions. + repeated string supported_aws_regions = 3; +} + +// Kubernetes version information of GKE cluster on AWS. +message AwsK8sVersionInfo { + // Kubernetes version name. + string version = 1; +} + +// SSH configuration for AWS resources. +message AwsSshConfig { + // Required. The name of the EC2 key pair used to login into cluster machines. + string ec2_key_pair = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of a proxy config stored in AWS Secret Manager. +message AwsProxyConfig { + // The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy + // configuration. + // + // The secret must be a JSON encoded proxy configuration + // as described in + // https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file + string secret_arn = 1; + + // The version string of the AWS Secret Manager secret that contains the + // HTTP(S) proxy configuration. + string secret_version = 2; +} + +// Config encryption for user data. +message AwsConfigEncryption { + // Required. The ARN of the AWS KMS key used to encrypt user data. + string kms_key_arn = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of placement information for an instance. +// Limitations for using the `host` tenancy: +// +// * T3 instances that use the unlimited CPU credit option don't support host +// tenancy. +message AwsInstancePlacement { + // Tenancy defines how EC2 instances are distributed across physical hardware. + enum Tenancy { + // Not set. + TENANCY_UNSPECIFIED = 0; + + // Use default VPC tenancy. + DEFAULT = 1; + + // Run a dedicated instance. + DEDICATED = 2; + + // Launch this instance to a dedicated host. + HOST = 3; + } + + // Required. The tenancy for instance. + Tenancy tenancy = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration related to CloudWatch metrics collection in an AWS +// Auto Scaling group. +message AwsAutoscalingGroupMetricsCollection { + // Required. The frequency at which EC2 Auto Scaling sends aggregated data to + // AWS CloudWatch. The only valid value is "1Minute". + string granularity = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The metrics to enable. For a list of valid metrics, see + // https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. + // If you specify Granularity and don't specify any metrics, all metrics are + // enabled. + repeated string metrics = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// AwsClusterError describes errors found on AWS clusters. +message AwsClusterError { + // Human-friendly description of the error. + string message = 1; +} + +// AwsNodePoolError describes errors found on AWS node pools. +message AwsNodePoolError { + // Human-friendly description of the error. + string message = 1; +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_service.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_service.proto new file mode 100644 index 00000000000..cb1f3a41db3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_service.proto @@ -0,0 +1,605 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/aws_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AwsServiceProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// The AwsClusters API provides a single centrally managed service +// to create and manage Anthos clusters that run on AWS infrastructure. +service AwsClusters { + option (google.api.default_host) = "gkemulticloud.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource on a given GCP project and region. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAwsCluster(CreateAwsClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/awsClusters" + body: "aws_cluster" + }; + option (google.api.method_signature) = "parent,aws_cluster,aws_cluster_id"; + option (google.longrunning.operation_info) = { + response_type: "AwsCluster" + metadata_type: "OperationMetadata" + }; + } + + // Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + rpc UpdateAwsCluster(UpdateAwsClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}" + body: "aws_cluster" + }; + option (google.api.method_signature) = "aws_cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AwsCluster" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource. + rpc GetAwsCluster(GetAwsClusterRequest) returns (AwsCluster) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/awsClusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + // on a given Google Cloud project and region. + rpc ListAwsClusters(ListAwsClustersRequest) + returns (ListAwsClustersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/awsClusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource. + // + // Fails if the cluster has one or more associated + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAwsCluster(DeleteAwsClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/awsClusters/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Generates a short-lived access token to authenticate to a given + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + rpc GenerateAwsAccessToken(GenerateAwsAccessTokenRequest) + returns (GenerateAwsAccessTokenResponse) { + option (google.api.http) = { + get: "/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessToken" + }; + } + + // Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], + // attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAwsNodePool(CreateAwsNodePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools" + body: "aws_node_pool" + }; + option (google.api.method_signature) = + "parent,aws_node_pool,aws_node_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "AwsNodePool" + metadata_type: "OperationMetadata" + }; + } + + // Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + rpc UpdateAwsNodePool(UpdateAwsNodePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" + body: "aws_node_pool" + }; + option (google.api.method_signature) = "aws_node_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AwsNodePool" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + rpc GetAwsNodePool(GetAwsNodePoolRequest) returns (AwsNodePool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resources on a given + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + rpc ListAwsNodePools(ListAwsNodePoolsRequest) + returns (ListAwsNodePoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resource. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAwsNodePool(DeleteAwsNodePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns information, such as supported AWS regions and Kubernetes + // versions, on a given Google Cloud location. + rpc GetAwsServerConfig(GetAwsServerConfigRequest) returns (AwsServerConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/awsServerConfig}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for `AwsClusters.CreateAwsCluster` method. +message CreateAwsClusterRequest { + // Required. The parent location where this + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + // created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; + + // Required. The specification of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + AwsCluster aws_cluster = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the + // parent resource. + // + // The provided ID will be part of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + // formatted as + // `projects//locations//awsClusters/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + string aws_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the cluster. + bool validate_only = 4; +} + +// Request message for `AwsClusters.UpdateAwsCluster` method. +message UpdateAwsClusterRequest { + // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource to update. + AwsCluster aws_cluster = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually update the cluster. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: + // + // * `description`. + // * `annotations`. + // * `control_plane.version`. + // * `authorization.admin_users`. + // * `control_plane.aws_services_authentication.role_arn`. + // * `control_plane.aws_services_authentication.role_session_name`. + // * `control_plane.config_encryption.kms_key_arn`. + // * `control_plane.instance_type`. + // * `control_plane.security_group_ids`. + // * `control_plane.proxy_config`. + // * `control_plane.proxy_config.secret_arn`. + // * `control_plane.proxy_config.secret_version`. + // * `control_plane.root_volume.size_gib`. + // * `control_plane.root_volume.volume_type`. + // * `control_plane.root_volume.iops`. + // * `control_plane.root_volume.kms_key_arn`. + // * `control_plane.ssh_config`. + // * `control_plane.ssh_config.ec2_key_pair`. + // * `control_plane.instance_placement.tenancy`. + // * `control_plane.iam_instance_profile`. + // * `logging_config.component_config.enable_components`. + // * `control_plane.tags`. + // * `monitoring_config.managed_prometheus_config.enabled`. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AwsClusters.GetAwsCluster` method. +message GetAwsClusterRequest { + // Required. The name of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + // describe. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; +} + +// Request message for `AwsClusters.ListAwsClusters` method. +message ListAwsClustersRequest { + // Required. The parent location which owns this collection of + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + // request, if any. + string page_token = 3; +} + +// Response message for `AwsClusters.ListAwsClusters` method. +message ListAwsClustersResponse { + // A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + // in the specified GCP project and region region. + repeated AwsCluster aws_clusters = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `AwsClusters.DeleteAwsCluster` method. +message DeleteAwsClusterRequest { + // Required. The resource name the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; + + // If set, only validate the request, but do not actually delete the resource. + bool validate_only = 2; + + // If set to true, and the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + // found, the request will succeed but no action will be taken on the server + // and a completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 3; + + // The current etag of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided etag does not match the current etag of the cluster, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// Response message for `AwsClusters.CreateAwsNodePool` method. +message CreateAwsNodePoolRequest { + // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource where this node pool will be created. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AwsNodePool" + } + ]; + + // Required. The specification of the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + AwsNodePool aws_node_pool = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the + // parent resource. + // + // The provided ID will be part of the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + // formatted as + // `projects//locations//awsClusters//awsNodePools/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + string aws_node_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the node + // pool. + bool validate_only = 4; +} + +// Request message for `AwsClusters.UpdateAwsNodePool` method. +message UpdateAwsNodePoolRequest { + // Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resource to update. + AwsNodePool aws_node_pool = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but don't actually update the node pool. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: + // + // * `annotations`. + // * `version`. + // * `autoscaling.min_node_count`. + // * `autoscaling.max_node_count`. + // * `config.config_encryption.kms_key_arn`. + // * `config.security_group_ids`. + // * `config.root_volume.iops`. + // * `config.root_volume.kms_key_arn`. + // * `config.root_volume.volume_type`. + // * `config.root_volume.size_gib`. + // * `config.proxy_config`. + // * `config.proxy_config.secret_arn`. + // * `config.proxy_config.secret_version`. + // * `config.ssh_config`. + // * `config.ssh_config.ec2_key_pair`. + // * `config.instance_placement.tenancy`. + // * `config.iam_instance_profile`. + // * `config.labels`. + // * `config.tags`. + // * `config.autoscaling_metrics_collection`. + // * `config.autoscaling_metrics_collection.granularity`. + // * `config.autoscaling_metrics_collection.metrics`. + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AwsClusters.GetAwsNodePool` method. +message GetAwsNodePoolRequest { + // Required. The name of the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + // describe. + // + // `AwsNodePool` names are formatted as + // `projects//locations//awsClusters//awsNodePools/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsNodePool" + } + ]; +} + +// Request message for `AwsClusters.ListAwsNodePools` method. +message ListAwsNodePoolsRequest { + // Required. The parent `AwsCluster` which owns this collection of + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AwsNodePool" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + // request, if any. + string page_token = 3; +} + +// Response message for `AwsClusters.ListAwsNodePools` method. +message ListAwsNodePoolsResponse { + // A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resources in the specified `AwsCluster`. + repeated AwsNodePool aws_node_pools = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `AwsClusters.DeleteAwsNodePool` method. +message DeleteAwsNodePoolRequest { + // Required. The resource name the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + // + // `AwsNodePool` names are formatted as + // `projects//locations//awsClusters//awsNodePools/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsNodePool" + } + ]; + + // If set, only validate the request, but do not actually delete the node + // pool. + bool validate_only = 2; + + // If set to true, and the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + // found, the request will succeed but no action will be taken on the server + // and a completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 3; + + // The current ETag of the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided ETag does not match the current etag of the node pool, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// GetAwsServerConfigRequest gets the server config of GKE cluster on AWS. +message GetAwsServerConfigRequest { + // Required. The name of the + // [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + // to describe. + // + // `AwsServerConfig` names are formatted as + // `projects//locations//awsServerConfig`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsServerConfig" + } + ]; +} + +// Request message for `AwsClusters.GenerateAwsAccessToken` method. +message GenerateAwsAccessTokenRequest { + // Required. The name of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + // authenticate to. + // + // `AwsCluster` names are formatted as + // `projects//locations//awsClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string aws_cluster = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AwsCluster" + } + ]; +} + +// Response message for `AwsClusters.GenerateAwsAccessToken` method. +message GenerateAwsAccessTokenResponse { + // Output only. Access token to authenticate to k8s api-server. + string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp at which the token will expire. + google.protobuf.Timestamp expiration_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_resources.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_resources.proto new file mode 100644 index 00000000000..b6750d76423 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_resources.proto @@ -0,0 +1,688 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/common_resources.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AzureResourcesProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// An Anthos cluster running on Azure. +message AzureCluster { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AzureCluster" + pattern: "projects/{project}/locations/{location}/azureClusters/{azure_cluster}" + }; + + // The lifecycle state of the cluster. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the cluster is being created. + PROVISIONING = 1; + + // The RUNNING state indicates the cluster has been created and is fully + // usable. + RUNNING = 2; + + // The RECONCILING state indicates that some work is actively being done on + // the cluster, such as upgrading the control plane replicas. + RECONCILING = 3; + + // The STOPPING state indicates the cluster is being deleted. + STOPPING = 4; + + // The ERROR state indicates the cluster is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the cluster requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Cluster names are formatted as + // `projects//locations//azureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1; + + // Optional. A human readable description of this cluster. + // Cannot be longer than 255 UTF-8 encoded bytes. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The Azure region where the cluster runs. + // + // Each Google Cloud region supports a subset of nearby Azure regions. + // You can call + // [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] + // to list all supported Azure regions within a given Google Cloud region. + string azure_region = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ARM ID of the resource group where the cluster resources are + // deployed. For example: + // `/subscriptions//resourceGroups/` + string resource_group_id = 17 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + // authentication configuration for how the Anthos Multi-Cloud API connects to + // Azure APIs. + // + // The `AzureClient` resource must reside on the same GCP project and region + // as the `AzureCluster`. + // + // `AzureClient` names are formatted as + // `projects//locations//azureClients/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string azure_client = 16 [(google.api.field_behavior) = REQUIRED]; + + // Required. Cluster-wide networking configuration. + AzureClusterNetworking networking = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration related to the cluster control plane. + AzureControlPlane control_plane = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration related to the cluster RBAC settings. + AzureAuthorization authorization = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the cluster. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The endpoint of the cluster's API server. + string endpoint = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the cluster. + string uid = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently changes in flight to the cluster. + bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was created. + google.protobuf.Timestamp create_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this cluster was last updated. + google.protobuf.Timestamp update_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 13; + + // Optional. Annotations on the cluster. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Keys can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Workload Identity settings. + WorkloadIdentityConfig workload_identity_config = 18 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. PEM encoded x509 certificate of the cluster root of trust. + string cluster_ca_certificate = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Fleet configuration. + Fleet fleet = 20 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Managed Azure resources for this cluster. + AzureClusterResources managed_resources = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Logging configuration for this cluster. + LoggingConfig logging_config = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A set of errors found in the cluster. + repeated AzureClusterError errors = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Monitoring configuration for this cluster. + MonitoringConfig monitoring_config = 25 + [(google.api.field_behavior) = OPTIONAL]; +} + +// ClusterNetworking contains cluster-wide networking configuration. +message AzureClusterNetworking { + // Required. The Azure Resource Manager (ARM) ID of the VNet associated with + // your cluster. + // + // All components in the cluster (i.e. control plane and node pools) run on a + // single VNet. + // + // Example: + // `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` + // + // This field cannot be changed after creation. + string virtual_network_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The IP address range of the pods in this cluster, in CIDR + // notation (e.g. `10.96.0.0/14`). + // + // All pods in the cluster get assigned a unique IPv4 address from these + // ranges. Only a single range is supported. + // + // This field cannot be changed after creation. + repeated string pod_address_cidr_blocks = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The IP address range for services in this cluster, in CIDR + // notation (e.g. `10.96.0.0/14`). + // + // All services in the cluster get assigned a unique IPv4 address from these + // ranges. Only a single range is supported. + // + // This field cannot be changed after creating a cluster. + repeated string service_address_cidr_blocks = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ARM ID of the subnet where Kubernetes private service type + // load balancers are deployed. When unspecified, it defaults to + // AzureControlPlane.subnet_id. + // + // Example: + // "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" + string service_load_balancer_subnet_id = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// AzureControlPlane represents the control plane configurations. +message AzureControlPlane { + // Required. The Kubernetes version to run on control plane replicas + // (e.g. `1.19.10-gke.1000`). + // + // You can list all supported versions on a given Google Cloud region by + // calling + // [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. + string version = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ARM ID of the default subnet for the control plane. The + // control plane VMs are deployed in this subnet, unless + // `AzureControlPlane.replica_placements` is specified. This subnet will also + // be used as default for `AzureControlPlane.endpoint_subnet_id` if + // `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will + // be used as default for + // `AzureClusterNetworking.service_load_balancer_subnet_id`. + // + // Example: + // `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. + string subnet_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + // + // For available VM sizes, see + // https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. + // + // When unspecified, it defaults to `Standard_DS2_v2`. + string vm_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. SSH configuration for how to access the underlying control plane + // machines. + AzureSshConfig ssh_config = 11 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Configuration related to the root volume provisioned for each + // control plane replica. + // + // When unspecified, it defaults to 32-GiB Azure Disk. + AzureDiskTemplate root_volume = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to the main volume provisioned for each + // control plane replica. + // The main volume is in charge of storing all of the cluster's etcd state. + // + // When unspecified, it defaults to a 8-GiB Azure Disk. + AzureDiskTemplate main_volume = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to application-layer secrets encryption. + AzureDatabaseEncryption database_encryption = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Proxy configuration for outbound HTTP(S) traffic. + AzureProxyConfig proxy_config = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to vm config encryption. + AzureConfigEncryption config_encryption = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of tags to apply to all underlying control plane Azure + // resources. + map tags = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for where to place the control plane replicas. + // + // Up to three replica placement instances can be specified. If + // replica_placements is set, the replica placement instances will be applied + // to the three control plane replicas as evenly as possible. + repeated ReplicaPlacement replica_placements = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ARM ID of the subnet where the control plane load balancer is + // deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. + // + // Example: + // "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" + string endpoint_subnet_id = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for the placement of a control plane replica. +message ReplicaPlacement { + // Required. For a given replica, the ARM ID of the subnet where the control + // plane VM is deployed. Make sure it's a subnet under the virtual network in + // the cluster configuration. + string subnet_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. For a given replica, the Azure availability zone where to + // provision the control plane VM and the ETCD disk. + string azure_availability_zone = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of a proxy config stored in Azure Key Vault. +message AzureProxyConfig { + // The ARM ID the of the resource group containing proxy keyvault. + // + // Resource group ids are formatted as + // `/subscriptions//resourceGroups/`. + string resource_group_id = 1; + + // The URL the of the proxy setting secret with its version. + // + // The secret must be a JSON encoded proxy configuration + // as described in + // https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file + // + // Secret ids are formatted as + // `https://.vault.azure.net/secrets//`. + string secret_id = 2; +} + +// Configuration related to application-layer secrets encryption. +// +// Anthos clusters on Azure encrypts your Kubernetes data at rest +// in etcd using Azure Key Vault. +message AzureDatabaseEncryption { + // Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. + // + // For example: + // `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + // Encryption will always take the latest version of the key and hence + // specific version is not supported. + string key_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration related to config data encryption. +// +// Azure VM bootstrap secret is envelope encrypted with the provided key vault +// key. +message AzureConfigEncryption { + // Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + // data. + // + // For example: + // `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` + string key_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. RSA key of the Azure Key Vault public key to use for encrypting + // the data. + // + // This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) + // in ASN.1 DER form. The string must be comprised of a single PEM block of + // type "PUBLIC KEY". + string public_key = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for Azure Disks. +message AzureDiskTemplate { + // Optional. The size of the disk, in GiBs. + // + // When unspecified, a default value is provided. See the specific reference + // in the parent resource. + int32 size_gib = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// `AzureClient` resources hold client authentication information needed by the +// Anthos Multi-Cloud API to manage Azure resources on your Azure subscription. +// +// When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is +// created, an `AzureClient` resource needs to be provided and all operations on +// Azure resources associated to that cluster will authenticate to Azure +// services using the given client. +// +// `AzureClient` resources are immutable and cannot be modified upon creation. +// +// Each `AzureClient` resource is bound to a single Azure Active Directory +// Application and tenant. +message AzureClient { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AzureClient" + pattern: "projects/{project}/locations/{location}/azureClients/{azure_client}" + }; + + // The name of this resource. + // + // `AzureClient` resource names are formatted as + // `projects//locations//azureClients/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1; + + // Required. The Azure Active Directory Tenant ID. + string tenant_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Azure Active Directory Application ID. + string application_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Annotations on the resource. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Keys can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The PEM encoded x509 certificate. + string pem_certificate = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the client. + string uid = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this resource was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration related to the cluster RBAC settings. +message AzureAuthorization { + // Required. Users that can perform operations as a cluster admin. A managed + // ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole + // to the users. Up to ten admin users can be provided. + // + // For more info on RBAC, see + // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles + repeated AzureClusterUser admin_users = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Identities of a user-type subject for Azure clusters. +message AzureClusterUser { + // Required. The name of the user, e.g. `my-gcp-id@gmail.com`. + string username = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// An Anthos node pool running on Azure. +message AzureNodePool { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AzureNodePool" + pattern: "projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}" + }; + + // The lifecycle state of the node pool. + enum State { + // Not set. + STATE_UNSPECIFIED = 0; + + // The PROVISIONING state indicates the node pool is being created. + PROVISIONING = 1; + + // The RUNNING state indicates the node pool has been created and is fully + // usable. + RUNNING = 2; + + // The RECONCILING state indicates that the node pool is being reconciled. + RECONCILING = 3; + + // The STOPPING state indicates the node pool is being deleted. + STOPPING = 4; + + // The ERROR state indicates the node pool is in a broken unrecoverable + // state. + ERROR = 5; + + // The DEGRADED state indicates the node pool requires user action to + // restore full functionality. + DEGRADED = 6; + } + + // The name of this resource. + // + // Node pool names are formatted as + // `projects//locations//azureClusters//azureNodePools/`. + // + // For more details on Google Cloud resource names, + // see [Resource Names](https://cloud.google.com/apis/design/resource_names) + string name = 1; + + // Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + // node pool. + string version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The node configuration of the node pool. + AzureNodeConfig config = 22 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ARM ID of the subnet where the node pool VMs run. Make sure + // it's a subnet under the virtual network in the cluster configuration. + string subnet_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Autoscaler configuration for this node pool. + AzureNodePoolAutoscaling autoscaling = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the node pool. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A globally unique identifier for the node pool. + string uid = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, there are currently pending changes to the node + // pool. + bool reconciling = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this node pool was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this node pool was last updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows clients to perform consistent read-modify-writes + // through optimistic concurrency control. + // + // Can be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 12; + + // Optional. Annotations on the node pool. + // + // This field has the same restrictions as Kubernetes annotations. + // The total size of all keys and values combined is limited to 256k. + // Keys can have 2 segments: prefix (optional) and name (required), + // separated by a slash (/). + // Prefix must be a DNS subdomain. + // Name must be 63 characters or less, begin and end with alphanumerics, + // with dashes (-), underscores (_), dots (.), and alphanumerics between. + map annotations = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The constraint on the maximum number of pods that can be run + // simultaneously on a node in the node pool. + MaxPodsConstraint max_pods_constraint = 21 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The Azure availability zone of the nodes in this nodepool. + // + // When unspecified, it defaults to `1`. + string azure_availability_zone = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A set of errors found in the node pool. + repeated AzureNodePoolError errors = 29 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Parameters that describe the configuration of all node machines +// on a given node pool. +message AzureNodeConfig { + // Optional. The Azure VM size name. Example: `Standard_DS2_v2`. + // + // See [Supported VM + // sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. + // + // When unspecified, it defaults to `Standard_DS2_v2`. + string vm_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to the root volume provisioned for each + // node pool machine. + // + // When unspecified, it defaults to a 32-GiB Azure Disk. + AzureDiskTemplate root_volume = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of tags to apply to all underlying Azure resources for this + // node pool. This currently only includes Virtual Machine Scale Sets. + // + // Specify at most 50 pairs containing alphanumerics, spaces, and symbols + // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + // 255 Unicode characters. + map tags = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The OS image type to use on node pool instances. + // Can have a value of `ubuntu`, or `windows` if the cluster enables + // the Windows node pool preview feature. + // + // When unspecified, it defaults to `ubuntu`. + string image_type = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. SSH configuration for how to access the node pool machines. + AzureSshConfig ssh_config = 7 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Proxy configuration for outbound HTTP(S) traffic. + AzureProxyConfig proxy_config = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to vm config encryption. + AzureConfigEncryption config_encryption = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The initial taints assigned to nodes of this node pool. + repeated NodeTaint taints = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The initial labels assigned to nodes of this node pool. An object + // containing a list of "key": value pairs. Example: { "name": "wrench", + // "mass": "1.3kg", "count": "3" }. + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration related to Kubernetes cluster autoscaler. +// +// The Kubernetes cluster autoscaler will automatically adjust the +// size of the node pool based on the cluster load. +message AzureNodePoolAutoscaling { + // Required. Minimum number of nodes in the node pool. Must be greater than or + // equal to 1 and less than or equal to max_node_count. + int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maximum number of nodes in the node pool. Must be greater than or + // equal to min_node_count and less than or equal to 50. + int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// AzureServerConfig contains information about a Google Cloud location, such as +// supported Azure regions and Kubernetes versions. +message AzureServerConfig { + option (google.api.resource) = { + type: "gkemulticloud.googleapis.com/AzureServerConfig" + pattern: "projects/{project}/locations/{location}/azureServerConfig" + }; + + // The `AzureServerConfig` resource name. + // + // `AzureServerConfig` names are formatted as + // `projects//locations//azureServerConfig`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1; + + // List of valid Kubernetes versions. + repeated AzureK8sVersionInfo valid_versions = 2; + + // The list of supported Azure regions. + repeated string supported_azure_regions = 3; +} + +// Information about a supported Kubernetes version. +message AzureK8sVersionInfo { + // A supported Kubernetes version (for example, `1.19.10-gke.1000`) + string version = 1; +} + +// SSH configuration for Azure resources. +message AzureSshConfig { + // Required. The SSH public key data for VMs managed by Anthos. This accepts + // the authorized_keys file format used in OpenSSH according to the sshd(8) + // manual page. + string authorized_key = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Managed Azure resources for the cluster. +// +// The values could change and be empty, depending on the state of the cluster. +message AzureClusterResources { + // Output only. The ARM ID of the cluster network security group. + string network_security_group_id = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ARM ID of the control plane application security group. + string control_plane_application_security_group_id = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AzureClusterError describes errors found on Azure clusters. +message AzureClusterError { + // Human-friendly description of the error. + string message = 1; +} + +// AzureNodePoolError describes errors found on Azure node pools. +message AzureNodePoolError { + // Human-friendly description of the error. + string message = 1; +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_service.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_service.proto new file mode 100644 index 00000000000..2593468ad42 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_service.proto @@ -0,0 +1,773 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/gkemulticloud/v1/azure_resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "AzureServiceProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// The AzureClusters API provides a single centrally managed service +// to create and manage Anthos clusters that run on Azure infrastructure. +service AzureClusters { + option (google.api.default_host) = "gkemulticloud.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resource on a given Google Cloud project and region. + // + // `AzureClient` resources hold client authentication + // information needed by the Anthos Multicloud API to manage Azure resources + // on your Azure subscription on your behalf. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAzureClient(CreateAzureClientRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/azureClients" + body: "azure_client" + }; + option (google.api.method_signature) = + "parent,azure_client,azure_client_id"; + option (google.longrunning.operation_info) = { + response_type: "AzureClient" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + rpc GetAzureClient(GetAzureClientRequest) returns (AzureClient) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/azureClients/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resources on a given Google Cloud project and region. + rpc ListAzureClients(ListAzureClientsRequest) + returns (ListAzureClientsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/azureClients" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resource. + // + // If the client is used by one or more clusters, deletion will + // fail and a `FAILED_PRECONDITION` error will be returned. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAzureClient(DeleteAzureClientRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/azureClients/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resource on a given GCP project and region. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAzureCluster(CreateAzureClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/azureClusters" + body: "azure_cluster" + }; + option (google.api.method_signature) = + "parent,azure_cluster,azure_cluster_id"; + option (google.longrunning.operation_info) = { + response_type: "AzureCluster" + metadata_type: "OperationMetadata" + }; + } + + // Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + rpc UpdateAzureCluster(UpdateAzureClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}" + body: "azure_cluster" + }; + option (google.api.method_signature) = "azure_cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AzureCluster" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + rpc GetAzureCluster(GetAzureClusterRequest) returns (AzureCluster) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/azureClusters/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resources on a given Google Cloud project and region. + rpc ListAzureClusters(ListAzureClustersRequest) + returns (ListAzureClustersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/azureClusters" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + // + // Fails if the cluster has one or more associated + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAzureCluster(DeleteAzureClusterRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/azureClusters/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Generates a short-lived access token to authenticate to a given + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + rpc GenerateAzureAccessToken(GenerateAzureAccessTokenRequest) + returns (GenerateAzureAccessTokenResponse) { + option (google.api.http) = { + get: "/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessToken" + }; + } + + // Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], + // attached to a given + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc CreateAzureNodePool(CreateAzureNodePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools" + body: "azure_node_pool" + }; + option (google.api.method_signature) = + "parent,azure_node_pool,azure_node_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "AzureNodePool" + metadata_type: "OperationMetadata" + }; + } + + // Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + rpc UpdateAzureNodePool(UpdateAzureNodePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" + body: "azure_node_pool" + }; + option (google.api.method_signature) = "azure_node_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AzureNodePool" + metadata_type: "OperationMetadata" + }; + } + + // Describes a specific + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + rpc GetAzureNodePool(GetAzureNodePoolRequest) returns (AzureNodePool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + // resources on a given + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + rpc ListAzureNodePools(ListAzureNodePoolsRequest) + returns (ListAzureNodePoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a specific + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + // + // If successful, the response contains a newly created + // [Operation][google.longrunning.Operation] resource that can be + // described to track the status of the operation. + rpc DeleteAzureNodePool(DeleteAzureNodePoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns information, such as supported Azure regions and Kubernetes + // versions, on a given Google Cloud location. + rpc GetAzureServerConfig(GetAzureServerConfigRequest) + returns (AzureServerConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/azureServerConfig}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for `AzureClusters.CreateAzureCluster` method. +message CreateAzureClusterRequest { + // Required. The parent location where this + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + // created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; + + // Required. The specification of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + AzureCluster azure_cluster = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the + // parent resource. + // + // The provided ID will be part of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + // formatted as + // `projects//locations//azureClusters/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + string azure_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the cluster. + bool validate_only = 4; +} + +// Request message for `AzureClusters.UpdateAzureCluster` method. +message UpdateAzureClusterRequest { + // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resource to update. + AzureCluster azure_cluster = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually update the cluster. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: + // + // * `description`. + // * `azureClient`. + // * `control_plane.version`. + // * `control_plane.vm_size`. + // * `annotations`. + // * `authorization.admin_users`. + // * `control_plane.root_volume.size_gib`. + // * `control_plane.proxy_config`. + // * `control_plane.proxy_config.resource_group_id`. + // * `control_plane.proxy_config.secret_id`. + // * `control_plane.ssh_config.authorized_key`. + // * `logging_config.component_config.enable_components` + // * `monitoring_config.managed_prometheus_config.enabled`. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AzureClusters.GetAzureCluster` method. +message GetAzureClusterRequest { + // Required. The name of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + // describe. + // + // `AzureCluster` names are formatted as + // `projects//locations//azureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; +} + +// Request message for `AzureClusters.ListAzureClusters` method. +message ListAzureClustersRequest { + // Required. The parent location which owns this collection of + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + // request, if any. + string page_token = 3; +} + +// Response message for `AzureClusters.ListAzureClusters` method. +message ListAzureClustersResponse { + // A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resources in the specified GCP project and region region. + repeated AzureCluster azure_clusters = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `Clusters.DeleteAzureCluster` method. +message DeleteAzureClusterRequest { + // Required. The resource name the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + // + // `AzureCluster` names are formatted as + // `projects//locations//azureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; + + // If set to true, and the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + // found, the request will succeed but no action will be taken on the server + // and a completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 2; + + // If set, only validate the request, but do not actually delete the resource. + bool validate_only = 3; + + // The current etag of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided etag does not match the current etag of the cluster, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// Response message for `AzureClusters.CreateAzureNodePool` method. +message CreateAzureNodePoolRequest { + // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resource where this node pool will be created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureNodePool" + } + ]; + + // Required. The specification of the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + AzureNodePool azure_node_pool = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the + // parent resource. + // + // The provided ID will be part of the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + // formatted as + // `projects//locations//azureClusters//azureNodePools/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + string azure_node_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the node + // pool. + bool validate_only = 4; +} + +// Request message for `AzureClusters.UpdateAzureNodePool` method. +message UpdateAzureNodePoolRequest { + // Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + // resource to update. + AzureNodePool azure_node_pool = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but don't actually update the node pool. + bool validate_only = 2; + + // Required. Mask of fields to update. At least one path must be supplied in + // this field. The elements of the repeated paths field can only include these + // fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: + // + // *. `annotations`. + // * `version`. + // * `autoscaling.min_node_count`. + // * `autoscaling.max_node_count`. + // * `config.ssh_config.authorized_key`. + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `AzureClusters.GetAzureNodePool` method. +message GetAzureNodePoolRequest { + // Required. The name of the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + // describe. + // + // `AzureNodePool` names are formatted as + // `projects//locations//azureClusters//azureNodePools/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureNodePool" + } + ]; +} + +// Request message for `AzureClusters.ListAzureNodePools` method. +message ListAzureNodePoolsRequest { + // Required. The parent `AzureCluster` which owns this collection of + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. + // + // `AzureCluster` names are formatted as + // `projects//locations//azureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureNodePool" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + // request, if any. + string page_token = 3; +} + +// Response message for `AzureClusters.ListAzureNodePools` method. +message ListAzureNodePoolsResponse { + // A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + // resources in the specified `AzureCluster`. + repeated AzureNodePool azure_node_pools = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Delete message for `AzureClusters.DeleteAzureNodePool` method. +message DeleteAzureNodePoolRequest { + // Required. The resource name the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + // + // `AzureNodePool` names are formatted as + // `projects//locations//azureClusters//azureNodePools/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureNodePool" + } + ]; + + // If set, only validate the request, but do not actually delete the node + // pool. + bool validate_only = 2; + + // If set to true, and the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + // not found, the request will succeed but no action will be taken on the + // server and a completed [Operation][google.longrunning.Operation] will be + // returned. + // + // Useful for idempotent deletion. + bool allow_missing = 3; + + // The current ETag of the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + // + // Allows clients to perform deletions through optimistic concurrency control. + // + // If the provided ETag does not match the current etag of the node pool, + // the request will fail and an ABORTED error will be returned. + string etag = 4; +} + +// GetAzureServerConfigRequest gets the server config of GKE cluster on Azure. +message GetAzureServerConfigRequest { + // Required. The name of the + // [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + // resource to describe. + // + // `AzureServerConfig` names are formatted as + // `projects//locations//azureServerConfig`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureServerConfig" + } + ]; +} + +// Request message for `AzureClusters.CreateAzureClient` method. +message CreateAzureClientRequest { + // Required. The parent location where this + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + // created. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureClient" + } + ]; + + // Required. The specification of the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + AzureClient azure_client = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A client provided ID the resource. Must be unique within the + // parent resource. + // + // The provided ID will be part of the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + // formatted as + // `projects//locations//azureClients/`. + // + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + string azure_client_id = 4 [(google.api.field_behavior) = REQUIRED]; + + // If set, only validate the request, but do not actually create the client. + bool validate_only = 3; +} + +// Request message for `AzureClusters.GetAzureClient` method. +message GetAzureClientRequest { + // Required. The name of the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + // describe. + // + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + // formatted as + // `projects//locations//azureClients/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureClient" + } + ]; +} + +// Request message for `AzureClusters.ListAzureClients` method. +message ListAzureClientsRequest { + // Required. The parent location which owns this collection of + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. + // + // Location names are formatted as `projects//locations/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on GCP resource names. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkemulticloud.googleapis.com/AzureClient" + } + ]; + + // The maximum number of items to return. + // + // If not specified, a default value of 50 will be used by the service. + // Regardless of the pageSize value, the response can include a partial list + // and a caller should only rely on response's + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2; + + // The `nextPageToken` value returned from a previous + // [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + // request, if any. + string page_token = 3; +} + +// Response message for `AzureClusters.ListAzureClients` method. +message ListAzureClientsResponse { + // A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resources in the specified Google Cloud project and region region. + repeated AzureClient azure_clients = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for `AzureClusters.DeleteAzureClient` method. +message DeleteAzureClientRequest { + // Required. The resource name the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + // + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + // formatted as + // `projects//locations//azureClients/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureClient" + } + ]; + + // If set to true, and the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + // found, the request will succeed but no action will be taken on the server + // and a completed [Operation][google.longrunning.Operation] will be returned. + // + // Useful for idempotent deletion. + bool allow_missing = 2; + + // If set, only validate the request, but do not actually delete the resource. + bool validate_only = 3; +} + +// Request message for `AzureClusters.GenerateAzureAccessToken` method. +message GenerateAzureAccessTokenRequest { + // Required. The name of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + // authenticate to. + // + // `AzureCluster` names are formatted as + // `projects//locations//AzureClusters/`. + // + // See [Resource Names](https://cloud.google.com/apis/design/resource_names) + // for more details on Google Cloud resource names. + string azure_cluster = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkemulticloud.googleapis.com/AzureCluster" + } + ]; +} + +// Response message for `AzureClusters.GenerateAzureAccessToken` method. +message GenerateAzureAccessTokenResponse { + // Output only. Access token to authenticate to k8s api-server. + string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp at which the token will expire. + google.protobuf.Timestamp expiration_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/common_resources.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/common_resources.proto new file mode 100644 index 00000000000..ba34f50b4c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/common_resources.proto @@ -0,0 +1,174 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkemulticloud.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; +option java_multiple_files = true; +option java_outer_classname = "CommonResourcesProto"; +option java_package = "com.google.cloud.gkemulticloud.v1"; +option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; +option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; + +// Workload Identity settings. +message WorkloadIdentityConfig { + // The OIDC issuer URL for this cluster. + string issuer_uri = 1; + + // The Workload Identity Pool associated to the cluster. + string workload_pool = 2; + + // The ID of the OIDC Identity Provider (IdP) associated to the Workload + // Identity Pool. + string identity_provider = 3; +} + +// Constraints applied to pods. +message MaxPodsConstraint { + // Required. The maximum number of pods to schedule on a single node. + int64 max_pods_per_node = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata about a long-running operation. +message OperationMetadata { + // Output only. The time at which this operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this operation was completed. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the resource associated to this operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_detail = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of any error that occurred during the + // operation. + string error_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The verb associated with the API method which triggered this + // operation. Possible values are "create", "delete", "update" and "import". + string verb = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether it has been requested cancellation + // for 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]; +} + +// The taint content for the node taint. +message NodeTaint { + // The taint effect. + enum Effect { + // Not set. + EFFECT_UNSPECIFIED = 0; + + // Do not allow new pods to schedule onto the node unless they tolerate the + // taint, but allow all pods submitted to Kubelet without going through the + // scheduler to start, and allow all already-running pods to continue + // running. Enforced by the scheduler. + NO_SCHEDULE = 1; + + // Like TaintEffectNoSchedule, but the scheduler tries not to schedule + // new pods onto the node, rather than prohibiting new pods from scheduling + // onto the node entirely. Enforced by the scheduler. + PREFER_NO_SCHEDULE = 2; + + // Evict any already-running pods that do not tolerate the taint. + // Currently enforced by NodeController. + NO_EXECUTE = 3; + } + + // Required. Key for the taint. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Value for the taint. + string value = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The taint effect. + Effect effect = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Fleet related configuration. +// +// Fleets are a Google Cloud concept for logically organizing clusters, +// letting you use and manage multi-cluster capabilities and apply +// consistent policies across your systems. +// +// See [Anthos +// Fleets](https://cloud.google.com/anthos/multicluster-management/fleets) for +// more details on Anthos multi-cluster capabilities using Fleets. +message Fleet { + // Required. The name of the Fleet host project where this cluster will be + // registered. + // + // Project names are formatted as + // `projects/`. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The name of the managed Hub Membership resource associated to + // this cluster. + // + // Membership names are formatted as + // `projects//locations/global/membership/`. + string membership = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Parameters that describe the Logging configuration in a cluster. +message LoggingConfig { + // The configuration of the logging components; + LoggingComponentConfig component_config = 1; +} + +// Parameters that describe the Logging component configuration in a cluster. +message LoggingComponentConfig { + // The components of the logging configuration; + enum Component { + // No component is specified + COMPONENT_UNSPECIFIED = 0; + + // This indicates that system logging components is enabled. + SYSTEM_COMPONENTS = 1; + + // This indicates that user workload logging component is enabled. + WORKLOADS = 2; + } + + // The components to be enabled. + repeated Component enable_components = 1; +} + +// Parameters that describe the Monitoring configuration in a cluster. +message MonitoringConfig { + // Enable Google Cloud Managed Service for Prometheus in the cluster. + ManagedPrometheusConfig managed_prometheus_config = 2; +} + +// ManagedPrometheusConfig defines the configuration for +// Google Cloud Managed Service for Prometheus. +message ManagedPrometheusConfig { + // Enable Managed Collection. + bool enabled = 1; +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.create_attached_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.create_attached_cluster.js new file mode 100644 index 00000000000..c3290b8a9b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.create_attached_cluster.js @@ -0,0 +1,88 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, attachedCluster, attachedClusterId) { + // [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location where this + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * Required. The specification of the + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster to create. + */ + // const attachedCluster = {} + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ + // const attachedClusterId = 'abc123' + /** + * If set, only validate the request, but do not actually create the cluster. + */ + // const validateOnly = true + + // Imports the Gkemulticloud library + const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AttachedClustersClient(); + + async function callCreateAttachedCluster() { + // Construct request + const request = { + parent, + attachedCluster, + attachedClusterId, + }; + + // Run request + const [operation] = await gkemulticloudClient.createAttachedCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAttachedCluster(); + // [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_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-gkemulticloud/v1/samples/generated/v1/attached_clusters.delete_attached_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.delete_attached_cluster.js new file mode 100644 index 00000000000..fc299acc82f --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.delete_attached_cluster.js @@ -0,0 +1,95 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name the + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster to delete. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const name = 'abc123' + /** + * If set, only validate the request, but do not actually delete the resource. + */ + // const validateOnly = true + /** + * If set to true, and the + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed Operation google.longrunning.Operation will be + * returned. + * Useful for idempotent deletion. + */ + // const allowMissing = true + /** + * If set to true, the deletion of + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + */ + // const ignoreErrors = true + /** + * The current etag of the + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + */ + // const etag = 'abc123' + + // Imports the Gkemulticloud library + const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AttachedClustersClient(); + + async function callDeleteAttachedCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkemulticloudClient.deleteAttachedCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAttachedCluster(); + // [END gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_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-gkemulticloud/v1/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js new file mode 100644 index 00000000000..4b2861324c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js @@ -0,0 +1,89 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, attachedClusterId, platformVersion) { + // [START gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location where this + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * name formatted as + * `projects//locations//attachedClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + */ + // const attachedClusterId = 'abc123' + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * GetAttachedServerConfig google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig. + */ + // const platformVersion = 'abc123' + + // Imports the Gkemulticloud library + const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AttachedClustersClient(); + + async function callGenerateAttachedClusterInstallManifest() { + // Construct request + const request = { + parent, + attachedClusterId, + platformVersion, + }; + + // Run request + const response = await gkemulticloudClient.generateAttachedClusterInstallManifest(request); + console.log(response); + } + + callGenerateAttachedClusterInstallManifest(); + // [END gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_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-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_cluster.js new file mode 100644 index 00000000000..b84a8b9e541 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_cluster.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * to describe. + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AttachedClustersClient(); + + async function callGetAttachedCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAttachedCluster(request); + console.log(response); + } + + callGetAttachedCluster(); + // [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_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-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_server_config.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_server_config.js new file mode 100644 index 00000000000..ee433d3652e --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_server_config.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AttachedServerConfig google.cloud.gkemulticloud.v1.AttachedServerConfig + * resource to describe. + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AttachedClustersClient(); + + async function callGetAttachedServerConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAttachedServerConfig(request); + console.log(response); + } + + callGetAttachedServerConfig(); + // [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_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-gkemulticloud/v1/samples/generated/v1/attached_clusters.import_attached_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.import_attached_cluster.js new file mode 100644 index 00000000000..8b3d6988766 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.import_attached_cluster.js @@ -0,0 +1,90 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, fleetMembership, platformVersion, distribution) { + // [START gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location where this + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * will be created. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * If set, only validate the request, but do not actually import the cluster. + */ + // const validateOnly = true + /** + * Required. The name of the fleet membership resource to import. + */ + // const fleetMembership = 'abc123' + /** + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * You can list all supported versions on a given Google Cloud region by + * calling + * GetAttachedServerConfig google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig. + */ + // const platformVersion = 'abc123' + /** + * Required. The Kubernetes distribution of the underlying attached cluster. + * Supported values: "eks", "aks". + */ + // const distribution = 'abc123' + + // Imports the Gkemulticloud library + const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AttachedClustersClient(); + + async function callImportAttachedCluster() { + // Construct request + const request = { + parent, + fleetMembership, + platformVersion, + distribution, + }; + + // Run request + const [operation] = await gkemulticloudClient.importAttachedCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportAttachedCluster(); + // [END gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_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-gkemulticloud/v1/samples/generated/v1/attached_clusters.list_attached_clusters.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.list_attached_clusters.js new file mode 100644 index 00000000000..c7d72897cb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.list_attached_clusters.js @@ -0,0 +1,82 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location which owns this collection of + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resources. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * nextPageToken google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * The `nextPageToken` value returned from a previous + * attachedClusters.list google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters + * request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Gkemulticloud library + const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AttachedClustersClient(); + + async function callListAttachedClusters() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await gkemulticloudClient.listAttachedClustersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAttachedClusters(); + // [END gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_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-gkemulticloud/v1/samples/generated/v1/attached_clusters.update_attached_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.update_attached_cluster.js new file mode 100644 index 00000000000..c82f977d066 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.update_attached_cluster.js @@ -0,0 +1,82 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(attachedCluster, updateMask) { + // [START gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster resource + * to update. + */ + // const attachedCluster = {} + /** + * If set, only validate the request, but do not actually update the cluster. + */ + // const validateOnly = true + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * AttachedCluster google.cloud.gkemulticloud.v1.AttachedCluster: + * * `description`. + * * `annotations`. + * * `platform_version`. + * * `authorization.admin_users`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + */ + // const updateMask = {} + + // Imports the Gkemulticloud library + const {AttachedClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AttachedClustersClient(); + + async function callUpdateAttachedCluster() { + // Construct request + const request = { + attachedCluster, + updateMask, + }; + + // Run request + const [operation] = await gkemulticloudClient.updateAttachedCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAttachedCluster(); + // [END gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_cluster.js new file mode 100644 index 00000000000..95e2fa44f29 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_cluster.js @@ -0,0 +1,88 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, awsCluster, awsClusterId) { + // [START gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location where this + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * Required. The specification of the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster to create. + */ + // const awsCluster = {} + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource name + * formatted as + * `projects//locations//awsClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ + // const awsClusterId = 'abc123' + /** + * If set, only validate the request, but do not actually create the cluster. + */ + // const validateOnly = true + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callCreateAwsCluster() { + // Construct request + const request = { + parent, + awsCluster, + awsClusterId, + }; + + // Run request + const [operation] = await gkemulticloudClient.createAwsCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAwsCluster(); + // [END gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_node_pool.js new file mode 100644 index 00000000000..acc6639b2ff --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_node_pool.js @@ -0,0 +1,89 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, awsNodePool, awsNodePoolId) { + // [START gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 AwsCluster google.cloud.gkemulticloud.v1.AwsCluster + * resource where this node pool will be created. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * Required. The specification of the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool to create. + */ + // const awsNodePool = {} + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ + // const awsNodePoolId = 'abc123' + /** + * If set, only validate the request, but do not actually create the node + * pool. + */ + // const validateOnly = true + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callCreateAwsNodePool() { + // Construct request + const request = { + parent, + awsNodePool, + awsNodePoolId, + }; + + // Run request + const [operation] = await gkemulticloudClient.createAwsNodePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAwsNodePool(); + // [END gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_cluster.js new file mode 100644 index 00000000000..b8660853955 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_cluster.js @@ -0,0 +1,87 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster to delete. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const name = 'abc123' + /** + * If set, only validate the request, but do not actually delete the resource. + */ + // const validateOnly = true + /** + * If set to true, and the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed Operation google.longrunning.Operation will be returned. + * Useful for idempotent deletion. + */ + // const allowMissing = true + /** + * The current etag of the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + */ + // const etag = 'abc123' + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callDeleteAwsCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkemulticloudClient.deleteAwsCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAwsCluster(); + // [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_node_pool.js new file mode 100644 index 00000000000..d5d83394596 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_node_pool.js @@ -0,0 +1,88 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool to delete. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + /** + * If set, only validate the request, but do not actually delete the node + * pool. + */ + // const validateOnly = true + /** + * If set to true, and the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed Operation google.longrunning.Operation will be returned. + * Useful for idempotent deletion. + */ + // const allowMissing = true + /** + * The current ETag of the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + */ + // const etag = 'abc123' + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callDeleteAwsNodePool() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkemulticloudClient.deleteAwsNodePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAwsNodePool(); + // [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.generate_aws_access_token.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.generate_aws_access_token.js new file mode 100644 index 00000000000..b5c1980aad4 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.generate_aws_access_token.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(awsCluster) { + // [START gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to + * authenticate to. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const awsCluster = 'abc123' + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callGenerateAwsAccessToken() { + // Construct request + const request = { + awsCluster, + }; + + // Run request + const response = await gkemulticloudClient.generateAwsAccessToken(request); + console.log(response); + } + + callGenerateAwsAccessToken(); + // [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_cluster.js new file mode 100644 index 00000000000..9a259c8d38e --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_cluster.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to + * describe. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callGetAwsCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAwsCluster(request); + console.log(response); + } + + callGetAwsCluster(); + // [END gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_node_pool.js new file mode 100644 index 00000000000..4c01379178b --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_node_pool.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource to + * describe. + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callGetAwsNodePool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAwsNodePool(request); + console.log(response); + } + + callGetAwsNodePool(); + // [END gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_server_config.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_server_config.js new file mode 100644 index 00000000000..0b0ee2ed3c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_server_config.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AwsServerConfig google.cloud.gkemulticloud.v1.AwsServerConfig resource + * to describe. + * `AwsServerConfig` names are formatted as + * `projects//locations//awsServerConfig`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callGetAwsServerConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAwsServerConfig(request); + console.log(response); + } + + callGetAwsServerConfig(); + // [END gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_clusters.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_clusters.js new file mode 100644 index 00000000000..d451b475cec --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_clusters.js @@ -0,0 +1,82 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location which owns this collection of + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resources. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * nextPageToken google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * The `nextPageToken` value returned from a previous + * awsClusters.list google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters + * request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callListAwsClusters() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await gkemulticloudClient.listAwsClustersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAwsClusters(); + // [END gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_node_pools.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_node_pools.js new file mode 100644 index 00000000000..6811a491a65 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_node_pools.js @@ -0,0 +1,83 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 `AwsCluster` which owns this collection of + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resources. + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * nextPageToken google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * The `nextPageToken` value returned from a previous + * awsNodePools.list google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools + * request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callListAwsNodePools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await gkemulticloudClient.listAwsNodePoolsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAwsNodePools(); + // [END gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_cluster.js new file mode 100644 index 00000000000..464f1a8ba39 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_cluster.js @@ -0,0 +1,97 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(awsCluster, updateMask) { + // [START gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 AwsCluster google.cloud.gkemulticloud.v1.AwsCluster + * resource to update. + */ + // const awsCluster = {} + /** + * If set, only validate the request, but do not actually update the cluster. + */ + // const validateOnly = true + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from AwsCluster google.cloud.gkemulticloud.v1.AwsCluster: + * * `description`. + * * `annotations`. + * * `control_plane.version`. + * * `authorization.admin_users`. + * * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. + * * `control_plane.config_encryption.kms_key_arn`. + * * `control_plane.instance_type`. + * * `control_plane.security_group_ids`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.secret_arn`. + * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. + * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.ssh_config`. + * * `control_plane.ssh_config.ec2_key_pair`. + * * `control_plane.instance_placement.tenancy`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. + */ + // const updateMask = {} + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callUpdateAwsCluster() { + // Construct request + const request = { + awsCluster, + updateMask, + }; + + // Run request + const [operation] = await gkemulticloudClient.updateAwsCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAwsCluster(); + // [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_node_pool.js new file mode 100644 index 00000000000..74fbf00ad92 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_node_pool.js @@ -0,0 +1,96 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(awsNodePool, updateMask) { + // [START gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool + * resource to update. + */ + // const awsNodePool = {} + /** + * If set, only validate the request, but don't actually update the node pool. + */ + // const validateOnly = true + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool: + * * `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.config_encryption.kms_key_arn`. + * * `config.security_group_ids`. + * * `config.root_volume.iops`. + * * `config.root_volume.kms_key_arn`. + * * `config.root_volume.volume_type`. + * * `config.root_volume.size_gib`. + * * `config.proxy_config`. + * * `config.proxy_config.secret_arn`. + * * `config.proxy_config.secret_version`. + * * `config.ssh_config`. + * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. + */ + // const updateMask = {} + + // Imports the Gkemulticloud library + const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AwsClustersClient(); + + async function callUpdateAwsNodePool() { + // Construct request + const request = { + awsNodePool, + updateMask, + }; + + // Run request + const [operation] = await gkemulticloudClient.updateAwsNodePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAwsNodePool(); + // [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_client.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_client.js new file mode 100644 index 00000000000..312a4f413e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_client.js @@ -0,0 +1,88 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, azureClient, azureClientId) { + // [START gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location where this + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * Required. The specification of the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient to create. + */ + // const azureClient = {} + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource name + * formatted as + * `projects//locations//azureClients/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ + // const azureClientId = 'abc123' + /** + * If set, only validate the request, but do not actually create the client. + */ + // const validateOnly = true + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callCreateAzureClient() { + // Construct request + const request = { + parent, + azureClient, + azureClientId, + }; + + // Run request + const [operation] = await gkemulticloudClient.createAzureClient(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAzureClient(); + // [END gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_cluster.js new file mode 100644 index 00000000000..af1cd2873e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_cluster.js @@ -0,0 +1,88 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, azureCluster, azureClusterId) { + // [START gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location where this + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource will be + * created. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * Required. The specification of the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster to create. + */ + // const azureCluster = {} + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource name + * formatted as + * `projects//locations//azureClusters/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ + // const azureClusterId = 'abc123' + /** + * If set, only validate the request, but do not actually create the cluster. + */ + // const validateOnly = true + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callCreateAzureCluster() { + // Construct request + const request = { + parent, + azureCluster, + azureClusterId, + }; + + // Run request + const [operation] = await gkemulticloudClient.createAzureCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAzureCluster(); + // [END gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_node_pool.js new file mode 100644 index 00000000000..6ffd6fbc320 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_node_pool.js @@ -0,0 +1,88 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, azureNodePool, azureNodePoolId) { + // [START gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 AzureCluster google.cloud.gkemulticloud.v1.AzureCluster + * resource where this node pool will be created. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * Required. The specification of the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool to create. + */ + // const azureNodePool = {} + /** + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. + */ + // const azureNodePoolId = 'abc123' + /** + * If set, only validate the request, but do not actually create the node + * pool. + */ + // const validateOnly = true + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callCreateAzureNodePool() { + // Construct request + const request = { + parent, + azureNodePool, + azureNodePoolId, + }; + + // Run request + const [operation] = await gkemulticloudClient.createAzureNodePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAzureNodePool(); + // [END gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_client.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_client.js new file mode 100644 index 00000000000..438122b811e --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_client.js @@ -0,0 +1,80 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient to delete. + * AzureClient google.cloud.gkemulticloud.v1.AzureClient names are + * formatted as + * `projects//locations//azureClients/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + /** + * If set to true, and the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed Operation google.longrunning.Operation will be returned. + * Useful for idempotent deletion. + */ + // const allowMissing = true + /** + * If set, only validate the request, but do not actually delete the resource. + */ + // const validateOnly = true + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callDeleteAzureClient() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkemulticloudClient.deleteAzureClient(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAzureClient(); + // [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_cluster.js new file mode 100644 index 00000000000..092e250c149 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_cluster.js @@ -0,0 +1,87 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster to delete. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const name = 'abc123' + /** + * If set to true, and the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed Operation google.longrunning.Operation will be returned. + * Useful for idempotent deletion. + */ + // const allowMissing = true + /** + * If set, only validate the request, but do not actually delete the resource. + */ + // const validateOnly = true + /** + * The current etag of the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + */ + // const etag = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callDeleteAzureCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkemulticloudClient.deleteAzureCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAzureCluster(); + // [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_node_pool.js new file mode 100644 index 00000000000..5fbd840e756 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_node_pool.js @@ -0,0 +1,89 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool to delete. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + /** + * If set, only validate the request, but do not actually delete the node + * pool. + */ + // const validateOnly = true + /** + * If set to true, and the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed Operation google.longrunning.Operation will be + * returned. + * Useful for idempotent deletion. + */ + // const allowMissing = true + /** + * The current ETag of the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool. + * Allows clients to perform deletions through optimistic concurrency control. + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + */ + // const etag = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callDeleteAzureNodePool() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkemulticloudClient.deleteAzureNodePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAzureNodePool(); + // [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.generate_azure_access_token.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.generate_azure_access_token.js new file mode 100644 index 00000000000..37b152847e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.generate_azure_access_token.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(azureCluster) { + // [START gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to + * authenticate to. + * `AzureCluster` names are formatted as + * `projects//locations//AzureClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const azureCluster = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callGenerateAzureAccessToken() { + // Construct request + const request = { + azureCluster, + }; + + // Run request + const response = await gkemulticloudClient.generateAzureAccessToken(request); + console.log(response); + } + + callGenerateAzureAccessToken(); + // [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_client.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_client.js new file mode 100644 index 00000000000..2a37a7c5228 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_client.js @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource to + * describe. + * AzureClient google.cloud.gkemulticloud.v1.AzureClient names are + * formatted as + * `projects//locations//azureClients/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callGetAzureClient() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAzureClient(request); + console.log(response); + } + + callGetAzureClient(); + // [END gkemulticloud_v1_generated_AzureClusters_GetAzureClient_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_cluster.js new file mode 100644 index 00000000000..e2f6b162ecb --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_cluster.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to + * describe. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callGetAzureCluster() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAzureCluster(request); + console.log(response); + } + + callGetAzureCluster(); + // [END gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_node_pool.js new file mode 100644 index 00000000000..6270108c0e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_node_pool.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource to + * describe. + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callGetAzureNodePool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAzureNodePool(request); + console.log(response); + } + + callGetAzureNodePool(); + // [END gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_server_config.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_server_config.js new file mode 100644 index 00000000000..c9054337c38 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_server_config.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 + * AzureServerConfig google.cloud.gkemulticloud.v1.AzureServerConfig + * resource to describe. + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const name = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callGetAzureServerConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkemulticloudClient.getAzureServerConfig(request); + console.log(response); + } + + callGetAzureServerConfig(); + // [END gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clients.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clients.js new file mode 100644 index 00000000000..df70f546379 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clients.js @@ -0,0 +1,82 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location which owns this collection of + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resources. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * nextPageToken google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * The `nextPageToken` value returned from a previous + * azureClients.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients + * request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callListAzureClients() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await gkemulticloudClient.listAzureClientsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAzureClients(); + // [END gkemulticloud_v1_generated_AzureClusters_ListAzureClients_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clusters.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clusters.js new file mode 100644 index 00000000000..798c2bbbc80 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clusters.js @@ -0,0 +1,82 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 location which owns this collection of + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resources. + * Location names are formatted as `projects//locations/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * nextPageToken google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * The `nextPageToken` value returned from a previous + * azureClusters.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters + * request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callListAzureClusters() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await gkemulticloudClient.listAzureClustersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAzureClusters(); + // [END gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_node_pools.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_node_pools.js new file mode 100644 index 00000000000..56cf39e548d --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_node_pools.js @@ -0,0 +1,83 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 `AzureCluster` which owns this collection of + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resources. + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * See Resource Names (https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + */ + // const parent = 'abc123' + /** + * The maximum number of items to return. + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * nextPageToken google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * The `nextPageToken` value returned from a previous + * azureNodePools.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools + * request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callListAzureNodePools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await gkemulticloudClient.listAzureNodePoolsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAzureNodePools(); + // [END gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_cluster.js new file mode 100644 index 00000000000..53c0359317d --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_cluster.js @@ -0,0 +1,87 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(azureCluster, updateMask) { + // [START gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 AzureCluster google.cloud.gkemulticloud.v1.AzureCluster + * resource to update. + */ + // const azureCluster = {} + /** + * If set, only validate the request, but do not actually update the cluster. + */ + // const validateOnly = true + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from AzureCluster google.cloud.gkemulticloud.v1.AzureCluster: + * * `description`. + * * `azureClient`. + * * `control_plane.version`. + * * `control_plane.vm_size`. + * * `annotations`. + * * `authorization.admin_users`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. + */ + // const updateMask = {} + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callUpdateAzureCluster() { + // Construct request + const request = { + azureCluster, + updateMask, + }; + + // Run request + const [operation] = await gkemulticloudClient.updateAzureCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAzureCluster(); + // [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_node_pool.js new file mode 100644 index 00000000000..1cd909bbc2e --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_node_pool.js @@ -0,0 +1,79 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(azureNodePool, updateMask) { + // [START gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It 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 AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool + * resource to update. + */ + // const azureNodePool = {} + /** + * If set, only validate the request, but don't actually update the node pool. + */ + // const validateOnly = true + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool: + * *. `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.ssh_config.authorized_key`. + */ + // const updateMask = {} + + // Imports the Gkemulticloud library + const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; + + // Instantiates a client + const gkemulticloudClient = new AzureClustersClient(); + + async function callUpdateAzureNodePool() { + // Construct request + const request = { + azureNodePool, + updateMask, + }; + + // Run request + const [operation] = await gkemulticloudClient.updateAzureNodePool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAzureNodePool(); + // [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_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-gkemulticloud/v1/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json new file mode 100644 index 00000000000..7651d08d27d --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json @@ -0,0 +1,1711 @@ +{ + "clientLibrary": { + "name": "nodejs-gkemulticloud", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.gkemulticloud.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async", + "title": "AttachedClusters createAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "attached_clusters.create_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedCluster", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "attached_cluster", + "type": ".google.cloud.gkemulticloud.v1.AttachedCluster" + }, + { + "name": "attached_cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "CreateAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async", + "title": "AttachedClusters updateAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Updates an [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].", + "canonical": true, + "file": "attached_clusters.update_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedCluster", + "async": true, + "parameters": [ + { + "name": "attached_cluster", + "type": ".google.cloud.gkemulticloud.v1.AttachedCluster" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "UpdateAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async", + "title": "AttachedClusters importAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Imports creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource by importing an existing Fleet Membership resource. Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "attached_clusters.import_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedCluster", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "fleet_membership", + "type": "TYPE_STRING" + }, + { + "name": "platform_version", + "type": "TYPE_STRING" + }, + { + "name": "distribution", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "ImportAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async", + "title": "AttachedClusters getAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Describes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.", + "canonical": true, + "file": "attached_clusters.get_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AttachedCluster", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "GetAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async", + "title": "AttachedClusters listAttachedClusters Sample", + "origin": "API_DEFINITION", + "description": " Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources on a given Google Cloud project and region.", + "canonical": true, + "file": "attached_clusters.list_attached_clusters.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.ListAttachedClustersResponse", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "ListAttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async", + "title": "AttachedClusters deleteAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "attached_clusters.delete_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "ignore_errors", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "DeleteAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async", + "title": "AttachedClusters getAttachedServerConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns information, such as supported Kubernetes versions, on a given Google Cloud location.", + "canonical": true, + "file": "attached_clusters.get_attached_server_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAttachedServerConfig", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AttachedServerConfig", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "GetAttachedServerConfig", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async", + "title": "AttachedClusters generateAttachedClusterInstallManifest Sample", + "origin": "API_DEFINITION", + "description": " Generates the install manifest to be installed on the target cluster.", + "canonical": true, + "file": "attached_clusters.generate_attached_cluster_install_manifest.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateAttachedClusterInstallManifest", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifest", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "attached_cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "platform_version", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "GenerateAttachedClusterInstallManifest", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifest", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async", + "title": "AttachedClusters createAwsCluster Sample", + "origin": "API_DEFINITION", + "description": " Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "aws_clusters.create_aws_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAwsCluster", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsCluster", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "aws_cluster", + "type": ".google.cloud.gkemulticloud.v1.AwsCluster" + }, + { + "name": "aws_cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "CreateAwsCluster", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsCluster", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async", + "title": "AttachedClusters updateAwsCluster Sample", + "origin": "API_DEFINITION", + "description": " Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].", + "canonical": true, + "file": "aws_clusters.update_aws_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAwsCluster", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsCluster", + "async": true, + "parameters": [ + { + "name": "aws_cluster", + "type": ".google.cloud.gkemulticloud.v1.AwsCluster" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "UpdateAwsCluster", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsCluster", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async", + "title": "AttachedClusters getAwsCluster Sample", + "origin": "API_DEFINITION", + "description": " Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.", + "canonical": true, + "file": "aws_clusters.get_aws_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAwsCluster", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AwsCluster", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "GetAwsCluster", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsCluster", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async", + "title": "AttachedClusters listAwsClusters Sample", + "origin": "API_DEFINITION", + "description": " Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and region.", + "canonical": true, + "file": "aws_clusters.list_aws_clusters.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.ListAwsClustersResponse", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "ListAwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async", + "title": "AttachedClusters deleteAwsCluster Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "aws_clusters.delete_aws_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAwsCluster", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "DeleteAwsCluster", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsCluster", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async", + "title": "AttachedClusters generateAwsAccessToken Sample", + "origin": "API_DEFINITION", + "description": " Generates a short-lived access token to authenticate to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.", + "canonical": true, + "file": "aws_clusters.generate_aws_access_token.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateAwsAccessToken", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GenerateAwsAccessToken", + "async": true, + "parameters": [ + { + "name": "aws_cluster", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "GenerateAwsAccessToken", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GenerateAwsAccessToken", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async", + "title": "AttachedClusters createAwsNodePool Sample", + "origin": "API_DEFINITION", + "description": " Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "aws_clusters.create_aws_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAwsNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsNodePool", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "aws_node_pool", + "type": ".google.cloud.gkemulticloud.v1.AwsNodePool" + }, + { + "name": "aws_node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "CreateAwsNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsNodePool", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async", + "title": "AttachedClusters updateAwsNodePool Sample", + "origin": "API_DEFINITION", + "description": " Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].", + "canonical": true, + "file": "aws_clusters.update_aws_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAwsNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsNodePool", + "async": true, + "parameters": [ + { + "name": "aws_node_pool", + "type": ".google.cloud.gkemulticloud.v1.AwsNodePool" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "UpdateAwsNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsNodePool", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async", + "title": "AttachedClusters getAwsNodePool Sample", + "origin": "API_DEFINITION", + "description": " Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.", + "canonical": true, + "file": "aws_clusters.get_aws_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAwsNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsNodePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AwsNodePool", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "GetAwsNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsNodePool", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async", + "title": "AttachedClusters listAwsNodePools Sample", + "origin": "API_DEFINITION", + "description": " Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].", + "canonical": true, + "file": "aws_clusters.list_aws_node_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAwsNodePools", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "ListAwsNodePools", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async", + "title": "AttachedClusters deleteAwsNodePool Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "aws_clusters.delete_aws_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAwsNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsNodePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "DeleteAwsNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsNodePool", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async", + "title": "AttachedClusters getAwsServerConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns information, such as supported AWS regions and Kubernetes versions, on a given Google Cloud location.", + "canonical": true, + "file": "aws_clusters.get_aws_server_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAwsServerConfig", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AwsServerConfig", + "client": { + "shortName": "AwsClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" + }, + "method": { + "shortName": "GetAwsServerConfig", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig", + "service": { + "shortName": "AwsClusters", + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async", + "title": "AttachedClusters createAzureClient Sample", + "origin": "API_DEFINITION", + "description": " Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project and region. `AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "azure_clusters.create_azure_client.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAzureClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureClient", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "azure_client", + "type": ".google.cloud.gkemulticloud.v1.AzureClient" + }, + { + "name": "azure_client_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "CreateAzureClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureClient", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async", + "title": "AttachedClusters getAzureClient Sample", + "origin": "API_DEFINITION", + "description": " Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.", + "canonical": true, + "file": "azure_clusters.get_azure_client.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAzureClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureClient", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AzureClient", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "GetAzureClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureClient", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async", + "title": "AttachedClusters listAzureClients Sample", + "origin": "API_DEFINITION", + "description": " Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and region.", + "canonical": true, + "file": "azure_clusters.list_azure_clients.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAzureClients", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.ListAzureClientsResponse", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "ListAzureClients", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async", + "title": "AttachedClusters deleteAzureClient Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "azure_clusters.delete_azure_client.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAzureClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureClient", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "DeleteAzureClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureClient", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async", + "title": "AttachedClusters createAzureCluster Sample", + "origin": "API_DEFINITION", + "description": " Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "azure_clusters.create_azure_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAzureCluster", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureCluster", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "azure_cluster", + "type": ".google.cloud.gkemulticloud.v1.AzureCluster" + }, + { + "name": "azure_cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "CreateAzureCluster", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureCluster", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async", + "title": "AttachedClusters updateAzureCluster Sample", + "origin": "API_DEFINITION", + "description": " Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].", + "canonical": true, + "file": "azure_clusters.update_azure_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAzureCluster", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureCluster", + "async": true, + "parameters": [ + { + "name": "azure_cluster", + "type": ".google.cloud.gkemulticloud.v1.AzureCluster" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "UpdateAzureCluster", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureCluster", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async", + "title": "AttachedClusters getAzureCluster Sample", + "origin": "API_DEFINITION", + "description": " Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.", + "canonical": true, + "file": "azure_clusters.get_azure_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAzureCluster", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AzureCluster", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "GetAzureCluster", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureCluster", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async", + "title": "AttachedClusters listAzureClusters Sample", + "origin": "API_DEFINITION", + "description": " Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and region.", + "canonical": true, + "file": "azure_clusters.list_azure_clusters.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.ListAzureClustersResponse", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "ListAzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async", + "title": "AttachedClusters deleteAzureCluster Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "azure_clusters.delete_azure_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAzureCluster", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureCluster", + "async": true, + "parameters": [ + { + "name": "name", + "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": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "DeleteAzureCluster", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureCluster", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async", + "title": "AttachedClusters generateAzureAccessToken Sample", + "origin": "API_DEFINITION", + "description": " Generates a short-lived access token to authenticate to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.", + "canonical": true, + "file": "azure_clusters.generate_azure_access_token.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateAzureAccessToken", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GenerateAzureAccessToken", + "async": true, + "parameters": [ + { + "name": "azure_cluster", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "GenerateAzureAccessToken", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GenerateAzureAccessToken", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async", + "title": "AttachedClusters createAzureNodePool Sample", + "origin": "API_DEFINITION", + "description": " Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "azure_clusters.create_azure_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAzureNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureNodePool", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "azure_node_pool", + "type": ".google.cloud.gkemulticloud.v1.AzureNodePool" + }, + { + "name": "azure_node_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "CreateAzureNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureNodePool", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async", + "title": "AttachedClusters updateAzureNodePool Sample", + "origin": "API_DEFINITION", + "description": " Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].", + "canonical": true, + "file": "azure_clusters.update_azure_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAzureNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureNodePool", + "async": true, + "parameters": [ + { + "name": "azure_node_pool", + "type": ".google.cloud.gkemulticloud.v1.AzureNodePool" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "UpdateAzureNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureNodePool", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async", + "title": "AttachedClusters getAzureNodePool Sample", + "origin": "API_DEFINITION", + "description": " Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.", + "canonical": true, + "file": "azure_clusters.get_azure_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAzureNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureNodePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AzureNodePool", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "GetAzureNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureNodePool", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async", + "title": "AttachedClusters listAzureNodePools Sample", + "origin": "API_DEFINITION", + "description": " Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].", + "canonical": true, + "file": "azure_clusters.list_azure_node_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAzureNodePools", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "ListAzureNodePools", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async", + "title": "AttachedClusters deleteAzureNodePool Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "azure_clusters.delete_azure_node_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAzureNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureNodePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "DeleteAzureNodePool", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureNodePool", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async", + "title": "AttachedClusters getAzureServerConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns information, such as supported Azure regions and Kubernetes versions, on a given Google Cloud location.", + "canonical": true, + "file": "azure_clusters.get_azure_server_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAzureServerConfig", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AzureServerConfig", + "client": { + "shortName": "AzureClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" + }, + "method": { + "shortName": "GetAzureServerConfig", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig", + "service": { + "shortName": "AzureClusters", + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/index.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/index.ts new file mode 100644 index 00000000000..249caeb9678 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/index.ts @@ -0,0 +1,29 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +const AttachedClustersClient = v1.AttachedClustersClient; +type AttachedClustersClient = v1.AttachedClustersClient; +const AwsClustersClient = v1.AwsClustersClient; +type AwsClustersClient = v1.AwsClustersClient; +const AzureClustersClient = v1.AzureClustersClient; +type AzureClustersClient = v1.AzureClustersClient; +export {v1, AttachedClustersClient, AwsClustersClient, AzureClustersClient}; +export default {v1, AttachedClustersClient, AwsClustersClient, AzureClustersClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client.ts new file mode 100644 index 00000000000..c8c5d51c62d --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client.ts @@ -0,0 +1,2024 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/attached_clusters_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './attached_clusters_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The AttachedClusters API provides a single centrally managed service + * to register and manage Anthos attached clusters that run on customer's owned + * infrastructure. + * @class + * @memberof v1 + */ +export class AttachedClustersClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + attachedClustersStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AttachedClustersClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AttachedClustersClient({fallback: 'rest'}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AttachedClustersClient; + const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest' ) { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + attachedClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' + ), + attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedServerConfig' + ), + awsClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' + ), + awsNodePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}' + ), + awsServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsServerConfig' + ), + azureClientPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClients/{azure_client}' + ), + azureClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}' + ), + azureNodePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}' + ), + azureServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureServerConfig' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listAttachedClusters: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'attachedClusters') + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=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 createAttachedClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AttachedCluster') as gax.protobuf.Type; + const createAttachedClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const updateAttachedClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AttachedCluster') as gax.protobuf.Type; + const updateAttachedClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const importAttachedClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AttachedCluster') as gax.protobuf.Type; + const importAttachedClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAttachedClusterResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAttachedClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAttachedCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAttachedClusterResponse.decode.bind(createAttachedClusterResponse), + createAttachedClusterMetadata.decode.bind(createAttachedClusterMetadata)), + updateAttachedCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAttachedClusterResponse.decode.bind(updateAttachedClusterResponse), + updateAttachedClusterMetadata.decode.bind(updateAttachedClusterMetadata)), + importAttachedCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importAttachedClusterResponse.decode.bind(importAttachedClusterResponse), + importAttachedClusterMetadata.decode.bind(importAttachedClusterMetadata)), + deleteAttachedCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAttachedClusterResponse.decode.bind(deleteAttachedClusterResponse), + deleteAttachedClusterMetadata.decode.bind(deleteAttachedClusterMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.gkemulticloud.v1.AttachedClusters', 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.attachedClustersStub) { + return this.attachedClustersStub; + } + + // Put together the "service stub" for + // google.cloud.gkemulticloud.v1.AttachedClusters. + this.attachedClustersStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.gkemulticloud.v1.AttachedClusters') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.gkemulticloud.v1.AttachedClusters, + 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 attachedClustersStubMethods = + ['createAttachedCluster', 'updateAttachedCluster', 'importAttachedCluster', 'getAttachedCluster', 'listAttachedClusters', 'deleteAttachedCluster', 'getAttachedServerConfig', 'generateAttachedClusterInstallManifest']; + for (const methodName of attachedClustersStubMethods) { + const callPromise = this.attachedClustersStub.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.attachedClustersStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'gkemulticloud.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 'gkemulticloud.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 -- + // ------------------- +/** + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * to describe. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.get_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async + */ + getAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|undefined, {}|undefined + ]>; + getAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|null|undefined, + {}|null|undefined>): void; + getAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|null|undefined, + {}|null|undefined>): void; + getAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|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.getAttachedCluster(request, options, callback); + } +/** + * Returns information, such as supported Kubernetes versions, on a given + * Google Cloud location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AttachedServerConfig|AttachedServerConfig} + * resource to describe. + * + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AttachedServerConfig]{@link google.cloud.gkemulticloud.v1.AttachedServerConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.get_attached_server_config.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async + */ + getAttachedServerConfig( + request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|undefined, {}|undefined + ]>; + getAttachedServerConfig( + request: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getAttachedServerConfig( + request: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getAttachedServerConfig( + request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|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.getAttachedServerConfig(request, options, callback); + } +/** + * Generates the install manifest to be installed on the target cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {string} request.attachedClusterId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + * @param {string} request.platformVersion + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig|GetAttachedServerConfig}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [GenerateAttachedClusterInstallManifestResponse]{@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async + */ + generateAttachedClusterInstallManifest( + request?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|undefined, {}|undefined + ]>; + generateAttachedClusterInstallManifest( + request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|null|undefined, + {}|null|undefined>): void; + generateAttachedClusterInstallManifest( + request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|null|undefined, + {}|null|undefined>): void; + generateAttachedClusterInstallManifest( + request?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|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.generateAttachedClusterInstallManifest(request, options, callback); + } + +/** + * Creates a new + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * on a given GCP project and region. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {google.cloud.gkemulticloud.v1.AttachedCluster} request.attachedCluster + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} to create. + * @param {string} request.attachedClusterId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually create the cluster. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.create_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async + */ + createAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, + 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.createAttachedCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAttachedCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.create_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async + */ + async checkCreateAttachedClusterProgress(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.createAttachedCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkemulticloud.v1.AttachedCluster} request.attachedCluster + * Required. The + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * to update. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually update the cluster. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}: + * + * * `description`. + * * `annotations`. + * * `platform_version`. + * * `authorization.admin_users`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.update_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async + */ + updateAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, + 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({ + 'attached_cluster.name': request.attachedCluster!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAttachedCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateAttachedCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.update_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async + */ + async checkUpdateAttachedClusterProgress(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.updateAttachedCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Imports creates a new + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * by importing an existing Fleet Membership resource. + * + * Attached Clusters created before the introduction of the Anthos Multi-Cloud + * API can be imported through this method. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually import the cluster. + * @param {string} request.fleetMembership + * Required. The name of the fleet membership resource to import. + * @param {string} request.platformVersion + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig|GetAttachedServerConfig}. + * @param {string} request.distribution + * Required. The Kubernetes distribution of the underlying attached cluster. + * + * Supported values: ["eks", "aks"]. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.import_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async + */ + importAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + importAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + importAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, + 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.importAttachedCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `importAttachedCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.import_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async + */ + async checkImportAttachedClusterProgress(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.importAttachedCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} to delete. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @param {boolean} request.allowMissing + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed {@link google.longrunning.Operation|Operation} will be + * returned. + * + * Useful for idempotent deletion. + * @param {boolean} request.ignoreErrors + * If set to true, the deletion of + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + * @param {string} request.etag + * The current etag of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.delete_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async + */ + deleteAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, + 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.deleteAttachedCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAttachedCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.delete_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async + */ + async checkDeleteAttachedClusterProgress(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.deleteAttachedCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} + * resources on a given Google Cloud project and region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. + * 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 `listAttachedClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAttachedClusters( + request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAttachedCluster[], + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse + ]>; + listAttachedClusters( + request: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAttachedCluster>): void; + listAttachedClusters( + request: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAttachedCluster>): void; + listAttachedClusters( + request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAttachedCluster>, + callback?: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAttachedCluster>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAttachedCluster[], + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + 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.listAttachedClusters(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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster} 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 `listAttachedClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAttachedClustersStream( + request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + 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['listAttachedClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAttachedClusters.createStream( + this.innerApiCalls.listAttachedClusters as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAttachedClusters`, 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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.list_attached_clusters.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async + */ + listAttachedClustersAsync( + request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + 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['listAttachedClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAttachedClusters.asyncIterate( + this.innerApiCalls['listAttachedClusters'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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. + * + * @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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} attached_cluster + * @returns {string} Resource name string. + */ + attachedClusterPath(project:string,location:string,attachedCluster:string) { + return this.pathTemplates.attachedClusterPathTemplate.render({ + project: project, + location: location, + attached_cluster: attachedCluster, + }); + } + + /** + * Parse the project from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).project; + } + + /** + * Parse the location from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).location; + } + + /** + * Parse the attached_cluster from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the attached_cluster. + */ + matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).attached_cluster; + } + + /** + * Return a fully-qualified attachedServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + attachedServerConfigPath(project:string,location:string) { + return this.pathTemplates.attachedServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).project; + } + + /** + * Parse the location from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).location; + } + + /** + * Return a fully-qualified awsCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aws_cluster + * @returns {string} Resource name string. + */ + awsClusterPath(project:string,location:string,awsCluster:string) { + return this.pathTemplates.awsClusterPathTemplate.render({ + project: project, + location: location, + aws_cluster: awsCluster, + }); + } + + /** + * Parse the project from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).project; + } + + /** + * Parse the location from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).location; + } + + /** + * Parse the aws_cluster from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the aws_cluster. + */ + matchAwsClusterFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).aws_cluster; + } + + /** + * Return a fully-qualified awsNodePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aws_cluster + * @param {string} aws_node_pool + * @returns {string} Resource name string. + */ + awsNodePoolPath(project:string,location:string,awsCluster:string,awsNodePool:string) { + return this.pathTemplates.awsNodePoolPathTemplate.render({ + project: project, + location: location, + aws_cluster: awsCluster, + aws_node_pool: awsNodePool, + }); + } + + /** + * Parse the project from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).project; + } + + /** + * Parse the location from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).location; + } + + /** + * Parse the aws_cluster from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the aws_cluster. + */ + matchAwsClusterFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_cluster; + } + + /** + * Parse the aws_node_pool from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the aws_node_pool. + */ + matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_node_pool; + } + + /** + * Return a fully-qualified awsServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + awsServerConfigPath(project:string,location:string) { + return this.pathTemplates.awsServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AwsServerConfig resource. + * + * @param {string} awsServerConfigName + * A fully-qualified path representing AwsServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsServerConfigName(awsServerConfigName: string) { + return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).project; + } + + /** + * Parse the location from AwsServerConfig resource. + * + * @param {string} awsServerConfigName + * A fully-qualified path representing AwsServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsServerConfigName(awsServerConfigName: string) { + return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).location; + } + + /** + * Return a fully-qualified azureClient resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_client + * @returns {string} Resource name string. + */ + azureClientPath(project:string,location:string,azureClient:string) { + return this.pathTemplates.azureClientPathTemplate.render({ + project: project, + location: location, + azure_client: azureClient, + }); + } + + /** + * Parse the project from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).project; + } + + /** + * Parse the location from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).location; + } + + /** + * Parse the azure_client from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the azure_client. + */ + matchAzureClientFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).azure_client; + } + + /** + * Return a fully-qualified azureCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_cluster + * @returns {string} Resource name string. + */ + azureClusterPath(project:string,location:string,azureCluster:string) { + return this.pathTemplates.azureClusterPathTemplate.render({ + project: project, + location: location, + azure_cluster: azureCluster, + }); + } + + /** + * Parse the project from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).project; + } + + /** + * Parse the location from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).location; + } + + /** + * Parse the azure_cluster from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the azure_cluster. + */ + matchAzureClusterFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).azure_cluster; + } + + /** + * Return a fully-qualified azureNodePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_cluster + * @param {string} azure_node_pool + * @returns {string} Resource name string. + */ + azureNodePoolPath(project:string,location:string,azureCluster:string,azureNodePool:string) { + return this.pathTemplates.azureNodePoolPathTemplate.render({ + project: project, + location: location, + azure_cluster: azureCluster, + azure_node_pool: azureNodePool, + }); + } + + /** + * Parse the project from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).project; + } + + /** + * Parse the location from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).location; + } + + /** + * Parse the azure_cluster from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the azure_cluster. + */ + matchAzureClusterFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_cluster; + } + + /** + * Parse the azure_node_pool from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the azure_node_pool. + */ + matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_node_pool; + } + + /** + * Return a fully-qualified azureServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + azureServerConfigPath(project:string,location:string) { + return this.pathTemplates.azureServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AzureServerConfig resource. + * + * @param {string} azureServerConfigName + * A fully-qualified path representing AzureServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureServerConfigName(azureServerConfigName: string) { + return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).project; + } + + /** + * Parse the location from AzureServerConfig resource. + * + * @param {string} azureServerConfigName + * A fully-qualified path representing AzureServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureServerConfigName(azureServerConfigName: string) { + return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).location; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * 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.attachedClustersStub && !this._terminated) { + return this.attachedClustersStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client_config.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client_config.json new file mode 100644 index 00000000000..476c8e0d695 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client_config.json @@ -0,0 +1,78 @@ +{ + "interfaces": { + "google.cloud.gkemulticloud.v1.AttachedClusters": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ImportAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAttachedClusters": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteAttachedCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAttachedServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GenerateAttachedClusterInstallManifest": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_proto_list.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_proto_list.json new file mode 100644 index 00000000000..288ec0e3d51 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_proto_list.json @@ -0,0 +1,9 @@ +[ + "../../protos/google/cloud/gkemulticloud/v1/attached_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/attached_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/aws_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/aws_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/azure_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/azure_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/common_resources.proto" +] diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client.ts new file mode 100644 index 00000000000..85da6c6185f --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client.ts @@ -0,0 +1,2571 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/aws_clusters_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './aws_clusters_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The AwsClusters API provides a single centrally managed service + * to create and manage Anthos clusters that run on AWS infrastructure. + * @class + * @memberof v1 + */ +export class AwsClustersClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + awsClustersStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AwsClustersClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AwsClustersClient({fallback: 'rest'}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AwsClustersClient; + const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest' ) { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + attachedClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' + ), + attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedServerConfig' + ), + awsClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' + ), + awsNodePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}' + ), + awsServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsServerConfig' + ), + azureClientPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClients/{azure_client}' + ), + azureClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}' + ), + azureNodePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}' + ), + azureServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureServerConfig' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listAwsClusters: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'awsClusters'), + listAwsNodePools: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'awsNodePools') + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=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 createAwsClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AwsCluster') as gax.protobuf.Type; + const createAwsClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const updateAwsClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AwsCluster') as gax.protobuf.Type; + const updateAwsClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAwsClusterResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAwsClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const createAwsNodePoolResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AwsNodePool') as gax.protobuf.Type; + const createAwsNodePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const updateAwsNodePoolResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AwsNodePool') as gax.protobuf.Type; + const updateAwsNodePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAwsNodePoolResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAwsNodePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAwsCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAwsClusterResponse.decode.bind(createAwsClusterResponse), + createAwsClusterMetadata.decode.bind(createAwsClusterMetadata)), + updateAwsCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAwsClusterResponse.decode.bind(updateAwsClusterResponse), + updateAwsClusterMetadata.decode.bind(updateAwsClusterMetadata)), + deleteAwsCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAwsClusterResponse.decode.bind(deleteAwsClusterResponse), + deleteAwsClusterMetadata.decode.bind(deleteAwsClusterMetadata)), + createAwsNodePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAwsNodePoolResponse.decode.bind(createAwsNodePoolResponse), + createAwsNodePoolMetadata.decode.bind(createAwsNodePoolMetadata)), + updateAwsNodePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAwsNodePoolResponse.decode.bind(updateAwsNodePoolResponse), + updateAwsNodePoolMetadata.decode.bind(updateAwsNodePoolMetadata)), + deleteAwsNodePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAwsNodePoolResponse.decode.bind(deleteAwsNodePoolResponse), + deleteAwsNodePoolMetadata.decode.bind(deleteAwsNodePoolMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.gkemulticloud.v1.AwsClusters', 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.awsClustersStub) { + return this.awsClustersStub; + } + + // Put together the "service stub" for + // google.cloud.gkemulticloud.v1.AwsClusters. + this.awsClustersStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.gkemulticloud.v1.AwsClusters') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.gkemulticloud.v1.AwsClusters, + 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 awsClustersStubMethods = + ['createAwsCluster', 'updateAwsCluster', 'getAwsCluster', 'listAwsClusters', 'deleteAwsCluster', 'generateAwsAccessToken', 'createAwsNodePool', 'updateAwsNodePool', 'getAwsNodePool', 'listAwsNodePools', 'deleteAwsNodePool', 'getAwsServerConfig']; + for (const methodName of awsClustersStubMethods) { + const callPromise = this.awsClustersStub.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.awsClustersStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'gkemulticloud.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 'gkemulticloud.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 -- + // ------------------- +/** + * Describes a specific {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to + * describe. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AwsCluster]{@link google.cloud.gkemulticloud.v1.AwsCluster}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.get_aws_cluster.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async + */ + getAwsCluster( + request?: protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsCluster, + protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|undefined, {}|undefined + ]>; + getAwsCluster( + request: protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsCluster, + protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|null|undefined, + {}|null|undefined>): void; + getAwsCluster( + request: protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsCluster, + protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|null|undefined, + {}|null|undefined>): void; + getAwsCluster( + request?: protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAwsCluster, + protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsCluster, + protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsCluster, + protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|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.getAwsCluster(request, options, callback); + } +/** + * Generates a short-lived access token to authenticate to a given + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.awsCluster + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to + * authenticate to. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [GenerateAwsAccessTokenResponse]{@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.generate_aws_access_token.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async + */ + generateAwsAccessToken( + request?: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|undefined, {}|undefined + ]>; + generateAwsAccessToken( + request: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|null|undefined, + {}|null|undefined>): void; + generateAwsAccessToken( + request: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|null|undefined, + {}|null|undefined>): void; + generateAwsAccessToken( + request?: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|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({ + 'aws_cluster': request.awsCluster ?? '', + }); + this.initialize(); + return this.innerApiCalls.generateAwsAccessToken(request, options, callback); + } +/** + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource to + * describe. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AwsNodePool]{@link google.cloud.gkemulticloud.v1.AwsNodePool}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.get_aws_node_pool.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async + */ + getAwsNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|undefined, {}|undefined + ]>; + getAwsNodePool( + request: protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|null|undefined, + {}|null|undefined>): void; + getAwsNodePool( + request: protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|null|undefined, + {}|null|undefined>): void; + getAwsNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAwsNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|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.getAwsNodePool(request, options, callback); + } +/** + * Returns information, such as supported AWS regions and Kubernetes + * versions, on a given Google Cloud location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AwsServerConfig|AwsServerConfig} resource + * to describe. + * + * `AwsServerConfig` names are formatted as + * `projects//locations//awsServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AwsServerConfig]{@link google.cloud.gkemulticloud.v1.AwsServerConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.get_aws_server_config.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async + */ + getAwsServerConfig( + request?: protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|undefined, {}|undefined + ]>; + getAwsServerConfig( + request: protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getAwsServerConfig( + request: protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getAwsServerConfig( + request?: protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|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.getAwsServerConfig(request, options, callback); + } + +/** + * Creates a new {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource on a given GCP project and region. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {google.cloud.gkemulticloud.v1.AwsCluster} request.awsCluster + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} to create. + * @param {string} request.awsClusterId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource name + * formatted as + * `projects//locations//awsClusters/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually create the cluster. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.create_aws_cluster.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async + */ + createAwsCluster( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAwsCluster( + request: protos.google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAwsCluster( + request: protos.google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAwsCluster( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest, + 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.createAwsCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAwsCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.create_aws_cluster.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async + */ + async checkCreateAwsClusterProgress(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.createAwsCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkemulticloud.v1.AwsCluster} request.awsCluster + * Required. The {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource to update. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually update the cluster. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}: + * + * * `description`. + * * `annotations`. + * * `control_plane.version`. + * * `authorization.admin_users`. + * * `control_plane.aws_services_authentication.role_arn`. + * * `control_plane.aws_services_authentication.role_session_name`. + * * `control_plane.config_encryption.kms_key_arn`. + * * `control_plane.instance_type`. + * * `control_plane.security_group_ids`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.secret_arn`. + * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. + * * `control_plane.root_volume.iops`. + * * `control_plane.root_volume.kms_key_arn`. + * * `control_plane.ssh_config`. + * * `control_plane.ssh_config.ec2_key_pair`. + * * `control_plane.instance_placement.tenancy`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.update_aws_cluster.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async + */ + updateAwsCluster( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAwsCluster( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAwsCluster( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAwsCluster( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest, + 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({ + 'aws_cluster.name': request.awsCluster!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAwsCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateAwsCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.update_aws_cluster.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async + */ + async checkUpdateAwsClusterProgress(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.updateAwsCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource. + * + * Fails if the cluster has one or more associated + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} to delete. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @param {boolean} request.allowMissing + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed {@link google.longrunning.Operation|Operation} will be returned. + * + * Useful for idempotent deletion. + * @param {string} request.etag + * The current etag of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.delete_aws_cluster.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async + */ + deleteAwsCluster( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAwsCluster( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAwsCluster( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAwsCluster( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest, + 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.deleteAwsCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAwsCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.delete_aws_cluster.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async + */ + async checkDeleteAwsClusterProgress(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.deleteAwsCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}, + * attached to a given {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource where this node pool will be created. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {google.cloud.gkemulticloud.v1.AwsNodePool} request.awsNodePool + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} to create. + * @param {string} request.awsNodePoolId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource name + * formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually create the node + * pool. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.create_aws_node_pool.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async + */ + createAwsNodePool( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAwsNodePool( + request: protos.google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAwsNodePool( + request: protos.google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAwsNodePool( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest, + 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.createAwsNodePool(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAwsNodePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.create_aws_node_pool.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async + */ + async checkCreateAwsNodePoolProgress(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.createAwsNodePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkemulticloud.v1.AwsNodePool} request.awsNodePool + * Required. The {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} + * resource to update. + * @param {boolean} request.validateOnly + * If set, only validate the request, but don't actually update the node pool. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}: + * + * * `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.config_encryption.kms_key_arn`. + * * `config.security_group_ids`. + * * `config.root_volume.iops`. + * * `config.root_volume.kms_key_arn`. + * * `config.root_volume.volume_type`. + * * `config.root_volume.size_gib`. + * * `config.proxy_config`. + * * `config.proxy_config.secret_arn`. + * * `config.proxy_config.secret_version`. + * * `config.ssh_config`. + * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.update_aws_node_pool.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async + */ + updateAwsNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAwsNodePool( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAwsNodePool( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAwsNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest, + 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({ + 'aws_node_pool.name': request.awsNodePool!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAwsNodePool(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateAwsNodePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.update_aws_node_pool.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async + */ + async checkUpdateAwsNodePoolProgress(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.updateAwsNodePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} + * resource. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} to delete. + * + * `AwsNodePool` names are formatted as + * `projects//locations//awsClusters//awsNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually delete the node + * pool. + * @param {boolean} request.allowMissing + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed {@link google.longrunning.Operation|Operation} will be returned. + * + * Useful for idempotent deletion. + * @param {string} request.etag + * The current ETag of the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.delete_aws_node_pool.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async + */ + deleteAwsNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAwsNodePool( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAwsNodePool( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAwsNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest, + 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.deleteAwsNodePool(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAwsNodePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.delete_aws_node_pool.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async + */ + async checkDeleteAwsNodePoolProgress(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.deleteAwsNodePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources + * on a given Google Cloud project and region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [AwsCluster]{@link google.cloud.gkemulticloud.v1.AwsCluster}. + * 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 `listAwsClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAwsClusters( + request?: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsCluster[], + protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse + ]>; + listAwsClusters( + request: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAwsCluster>): void; + listAwsClusters( + request: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAwsCluster>): void; + listAwsClusters( + request?: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAwsCluster>, + callback?: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAwsCluster>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsCluster[], + protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + 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.listAwsClusters(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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [AwsCluster]{@link google.cloud.gkemulticloud.v1.AwsCluster} 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 `listAwsClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAwsClustersStream( + request?: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + 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['listAwsClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAwsClusters.createStream( + this.innerApiCalls.listAwsClusters as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAwsClusters`, 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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AwsCluster]{@link google.cloud.gkemulticloud.v1.AwsCluster}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.list_aws_clusters.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async + */ + listAwsClustersAsync( + request?: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, + 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['listAwsClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAwsClusters.asyncIterate( + this.innerApiCalls['listAwsClusters'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} + * resources on a given + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent `AwsCluster` which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [AwsNodePool]{@link google.cloud.gkemulticloud.v1.AwsNodePool}. + * 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 `listAwsNodePoolsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAwsNodePools( + request?: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsNodePool[], + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse + ]>; + listAwsNodePools( + request: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAwsNodePool>): void; + listAwsNodePools( + request: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAwsNodePool>): void; + listAwsNodePools( + request?: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAwsNodePool>, + callback?: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAwsNodePool>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAwsNodePool[], + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + 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.listAwsNodePools(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 `AwsCluster` which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [AwsNodePool]{@link google.cloud.gkemulticloud.v1.AwsNodePool} 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 `listAwsNodePoolsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAwsNodePoolsStream( + request?: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + 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['listAwsNodePools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAwsNodePools.createStream( + this.innerApiCalls.listAwsNodePools as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAwsNodePools`, 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 `AwsCluster` which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. + * + * `AwsCluster` names are formatted as + * `projects//locations//awsClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AwsNodePool]{@link google.cloud.gkemulticloud.v1.AwsNodePool}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/aws_clusters.list_aws_node_pools.js + * region_tag:gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async + */ + listAwsNodePoolsAsync( + request?: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, + 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['listAwsNodePools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAwsNodePools.asyncIterate( + this.innerApiCalls['listAwsNodePools'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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. + * + * @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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} attached_cluster + * @returns {string} Resource name string. + */ + attachedClusterPath(project:string,location:string,attachedCluster:string) { + return this.pathTemplates.attachedClusterPathTemplate.render({ + project: project, + location: location, + attached_cluster: attachedCluster, + }); + } + + /** + * Parse the project from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).project; + } + + /** + * Parse the location from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).location; + } + + /** + * Parse the attached_cluster from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the attached_cluster. + */ + matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).attached_cluster; + } + + /** + * Return a fully-qualified attachedServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + attachedServerConfigPath(project:string,location:string) { + return this.pathTemplates.attachedServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).project; + } + + /** + * Parse the location from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).location; + } + + /** + * Return a fully-qualified awsCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aws_cluster + * @returns {string} Resource name string. + */ + awsClusterPath(project:string,location:string,awsCluster:string) { + return this.pathTemplates.awsClusterPathTemplate.render({ + project: project, + location: location, + aws_cluster: awsCluster, + }); + } + + /** + * Parse the project from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).project; + } + + /** + * Parse the location from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).location; + } + + /** + * Parse the aws_cluster from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the aws_cluster. + */ + matchAwsClusterFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).aws_cluster; + } + + /** + * Return a fully-qualified awsNodePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aws_cluster + * @param {string} aws_node_pool + * @returns {string} Resource name string. + */ + awsNodePoolPath(project:string,location:string,awsCluster:string,awsNodePool:string) { + return this.pathTemplates.awsNodePoolPathTemplate.render({ + project: project, + location: location, + aws_cluster: awsCluster, + aws_node_pool: awsNodePool, + }); + } + + /** + * Parse the project from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).project; + } + + /** + * Parse the location from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).location; + } + + /** + * Parse the aws_cluster from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the aws_cluster. + */ + matchAwsClusterFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_cluster; + } + + /** + * Parse the aws_node_pool from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the aws_node_pool. + */ + matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_node_pool; + } + + /** + * Return a fully-qualified awsServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + awsServerConfigPath(project:string,location:string) { + return this.pathTemplates.awsServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AwsServerConfig resource. + * + * @param {string} awsServerConfigName + * A fully-qualified path representing AwsServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsServerConfigName(awsServerConfigName: string) { + return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).project; + } + + /** + * Parse the location from AwsServerConfig resource. + * + * @param {string} awsServerConfigName + * A fully-qualified path representing AwsServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsServerConfigName(awsServerConfigName: string) { + return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).location; + } + + /** + * Return a fully-qualified azureClient resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_client + * @returns {string} Resource name string. + */ + azureClientPath(project:string,location:string,azureClient:string) { + return this.pathTemplates.azureClientPathTemplate.render({ + project: project, + location: location, + azure_client: azureClient, + }); + } + + /** + * Parse the project from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).project; + } + + /** + * Parse the location from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).location; + } + + /** + * Parse the azure_client from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the azure_client. + */ + matchAzureClientFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).azure_client; + } + + /** + * Return a fully-qualified azureCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_cluster + * @returns {string} Resource name string. + */ + azureClusterPath(project:string,location:string,azureCluster:string) { + return this.pathTemplates.azureClusterPathTemplate.render({ + project: project, + location: location, + azure_cluster: azureCluster, + }); + } + + /** + * Parse the project from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).project; + } + + /** + * Parse the location from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).location; + } + + /** + * Parse the azure_cluster from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the azure_cluster. + */ + matchAzureClusterFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).azure_cluster; + } + + /** + * Return a fully-qualified azureNodePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_cluster + * @param {string} azure_node_pool + * @returns {string} Resource name string. + */ + azureNodePoolPath(project:string,location:string,azureCluster:string,azureNodePool:string) { + return this.pathTemplates.azureNodePoolPathTemplate.render({ + project: project, + location: location, + azure_cluster: azureCluster, + azure_node_pool: azureNodePool, + }); + } + + /** + * Parse the project from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).project; + } + + /** + * Parse the location from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).location; + } + + /** + * Parse the azure_cluster from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the azure_cluster. + */ + matchAzureClusterFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_cluster; + } + + /** + * Parse the azure_node_pool from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the azure_node_pool. + */ + matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_node_pool; + } + + /** + * Return a fully-qualified azureServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + azureServerConfigPath(project:string,location:string) { + return this.pathTemplates.azureServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AzureServerConfig resource. + * + * @param {string} azureServerConfigName + * A fully-qualified path representing AzureServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureServerConfigName(azureServerConfigName: string) { + return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).project; + } + + /** + * Parse the location from AzureServerConfig resource. + * + * @param {string} azureServerConfigName + * A fully-qualified path representing AzureServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureServerConfigName(azureServerConfigName: string) { + return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).location; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * 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.awsClustersStub && !this._terminated) { + return this.awsClustersStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client_config.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client_config.json new file mode 100644 index 00000000000..714cb1ace74 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client_config.json @@ -0,0 +1,98 @@ +{ + "interfaces": { + "google.cloud.gkemulticloud.v1.AwsClusters": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateAwsCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAwsCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAwsCluster": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAwsClusters": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteAwsCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GenerateAwsAccessToken": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateAwsNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAwsNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAwsNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAwsNodePools": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteAwsNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAwsServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_proto_list.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_proto_list.json new file mode 100644 index 00000000000..288ec0e3d51 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_proto_list.json @@ -0,0 +1,9 @@ +[ + "../../protos/google/cloud/gkemulticloud/v1/attached_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/attached_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/aws_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/aws_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/azure_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/azure_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/common_resources.proto" +] diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client.ts new file mode 100644 index 00000000000..14c1a1c2686 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client.ts @@ -0,0 +1,3098 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/azure_clusters_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './azure_clusters_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The AzureClusters API provides a single centrally managed service + * to create and manage Anthos clusters that run on Azure infrastructure. + * @class + * @memberof v1 + */ +export class AzureClustersClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + azureClustersStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AzureClustersClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AzureClustersClient({fallback: 'rest'}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AzureClustersClient; + const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest' ) { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + attachedClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' + ), + attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedServerConfig' + ), + awsClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' + ), + awsNodePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}' + ), + awsServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsServerConfig' + ), + azureClientPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClients/{azure_client}' + ), + azureClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}' + ), + azureNodePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}' + ), + azureServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureServerConfig' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listAzureClients: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'azureClients'), + listAzureClusters: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'azureClusters'), + listAzureNodePools: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'azureNodePools') + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=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 createAzureClientResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AzureClient') as gax.protobuf.Type; + const createAzureClientMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAzureClientResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAzureClientMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const createAzureClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AzureCluster') as gax.protobuf.Type; + const createAzureClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const updateAzureClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AzureCluster') as gax.protobuf.Type; + const updateAzureClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAzureClusterResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAzureClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const createAzureNodePoolResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AzureNodePool') as gax.protobuf.Type; + const createAzureNodePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const updateAzureNodePoolResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AzureNodePool') as gax.protobuf.Type; + const updateAzureNodePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAzureNodePoolResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAzureNodePoolMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAzureClient: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAzureClientResponse.decode.bind(createAzureClientResponse), + createAzureClientMetadata.decode.bind(createAzureClientMetadata)), + deleteAzureClient: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAzureClientResponse.decode.bind(deleteAzureClientResponse), + deleteAzureClientMetadata.decode.bind(deleteAzureClientMetadata)), + createAzureCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAzureClusterResponse.decode.bind(createAzureClusterResponse), + createAzureClusterMetadata.decode.bind(createAzureClusterMetadata)), + updateAzureCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAzureClusterResponse.decode.bind(updateAzureClusterResponse), + updateAzureClusterMetadata.decode.bind(updateAzureClusterMetadata)), + deleteAzureCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAzureClusterResponse.decode.bind(deleteAzureClusterResponse), + deleteAzureClusterMetadata.decode.bind(deleteAzureClusterMetadata)), + createAzureNodePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAzureNodePoolResponse.decode.bind(createAzureNodePoolResponse), + createAzureNodePoolMetadata.decode.bind(createAzureNodePoolMetadata)), + updateAzureNodePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAzureNodePoolResponse.decode.bind(updateAzureNodePoolResponse), + updateAzureNodePoolMetadata.decode.bind(updateAzureNodePoolMetadata)), + deleteAzureNodePool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAzureNodePoolResponse.decode.bind(deleteAzureNodePoolResponse), + deleteAzureNodePoolMetadata.decode.bind(deleteAzureNodePoolMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.gkemulticloud.v1.AzureClusters', 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.azureClustersStub) { + return this.azureClustersStub; + } + + // Put together the "service stub" for + // google.cloud.gkemulticloud.v1.AzureClusters. + this.azureClustersStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.gkemulticloud.v1.AzureClusters') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.gkemulticloud.v1.AzureClusters, + 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 azureClustersStubMethods = + ['createAzureClient', 'getAzureClient', 'listAzureClients', 'deleteAzureClient', 'createAzureCluster', 'updateAzureCluster', 'getAzureCluster', 'listAzureClusters', 'deleteAzureCluster', 'generateAzureAccessToken', 'createAzureNodePool', 'updateAzureNodePool', 'getAzureNodePool', 'listAzureNodePools', 'deleteAzureNodePool', 'getAzureServerConfig']; + for (const methodName of azureClustersStubMethods) { + const callPromise = this.azureClustersStub.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.azureClustersStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'gkemulticloud.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 'gkemulticloud.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 -- + // ------------------- +/** + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource to + * describe. + * + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} names are + * formatted as + * `projects//locations//azureClients/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AzureClient]{@link google.cloud.gkemulticloud.v1.AzureClient}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.get_azure_client.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async + */ + getAzureClient( + request?: protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureClient, + protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|undefined, {}|undefined + ]>; + getAzureClient( + request: protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureClient, + protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|null|undefined, + {}|null|undefined>): void; + getAzureClient( + request: protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureClient, + protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|null|undefined, + {}|null|undefined>): void; + getAzureClient( + request?: protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAzureClient, + protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureClient, + protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureClient, + protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|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.getAzureClient(request, options, callback); + } +/** + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to + * describe. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AzureCluster]{@link google.cloud.gkemulticloud.v1.AzureCluster}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.get_azure_cluster.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async + */ + getAzureCluster( + request?: protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureCluster, + protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|undefined, {}|undefined + ]>; + getAzureCluster( + request: protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureCluster, + protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|null|undefined, + {}|null|undefined>): void; + getAzureCluster( + request: protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureCluster, + protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|null|undefined, + {}|null|undefined>): void; + getAzureCluster( + request?: protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAzureCluster, + protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureCluster, + protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureCluster, + protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|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.getAzureCluster(request, options, callback); + } +/** + * Generates a short-lived access token to authenticate to a given + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.azureCluster + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to + * authenticate to. + * + * `AzureCluster` names are formatted as + * `projects//locations//AzureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [GenerateAzureAccessTokenResponse]{@link google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.generate_azure_access_token.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async + */ + generateAzureAccessToken( + request?: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|undefined, {}|undefined + ]>; + generateAzureAccessToken( + request: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|null|undefined, + {}|null|undefined>): void; + generateAzureAccessToken( + request: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|null|undefined, + {}|null|undefined>): void; + generateAzureAccessToken( + request?: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, + protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|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({ + 'azure_cluster': request.azureCluster ?? '', + }); + this.initialize(); + return this.innerApiCalls.generateAzureAccessToken(request, options, callback); + } +/** + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource to + * describe. + * + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AzureNodePool]{@link google.cloud.gkemulticloud.v1.AzureNodePool}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.get_azure_node_pool.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async + */ + getAzureNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|undefined, {}|undefined + ]>; + getAzureNodePool( + request: protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|null|undefined, + {}|null|undefined>): void; + getAzureNodePool( + request: protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|null|undefined, + {}|null|undefined>): void; + getAzureNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAzureNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureNodePool, + protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|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.getAzureNodePool(request, options, callback); + } +/** + * Returns information, such as supported Azure regions and Kubernetes + * versions, on a given Google Cloud location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureServerConfig|AzureServerConfig} + * resource to describe. + * + * `AzureServerConfig` names are formatted as + * `projects//locations//azureServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AzureServerConfig]{@link google.cloud.gkemulticloud.v1.AzureServerConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.get_azure_server_config.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async + */ + getAzureServerConfig( + request?: protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|undefined, {}|undefined + ]>; + getAzureServerConfig( + request: protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getAzureServerConfig( + request: protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|null|undefined, + {}|null|undefined>): void; + getAzureServerConfig( + request?: protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, + protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|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.getAzureServerConfig(request, options, callback); + } + +/** + * Creates a new {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} + * resource on a given Google Cloud project and region. + * + * `AzureClient` resources hold client authentication + * information needed by the Anthos Multicloud API to manage Azure resources + * on your Azure subscription on your behalf. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {google.cloud.gkemulticloud.v1.AzureClient} request.azureClient + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} to create. + * @param {string} request.azureClientId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource name + * formatted as + * `projects//locations//azureClients/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually create the client. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.create_azure_client.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async + */ + createAzureClient( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureClientRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAzureClient( + request: protos.google.cloud.gkemulticloud.v1.ICreateAzureClientRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAzureClient( + request: protos.google.cloud.gkemulticloud.v1.ICreateAzureClientRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAzureClient( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureClientRequest, + 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.createAzureClient(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAzureClient()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.create_azure_client.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async + */ + async checkCreateAzureClientProgress(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.createAzureClient, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} + * resource. + * + * If the client is used by one or more clusters, deletion will + * fail and a `FAILED_PRECONDITION` error will be returned. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} to delete. + * + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} names are + * formatted as + * `projects//locations//azureClients/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {boolean} request.allowMissing + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed {@link google.longrunning.Operation|Operation} will be returned. + * + * Useful for idempotent deletion. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.delete_azure_client.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async + */ + deleteAzureClient( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClientRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAzureClient( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClientRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAzureClient( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClientRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAzureClient( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClientRequest, + 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.deleteAzureClient(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAzureClient()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.delete_azure_client.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async + */ + async checkDeleteAzureClientProgress(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.deleteAzureClient, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} + * resource on a given GCP project and region. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource will be + * created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {google.cloud.gkemulticloud.v1.AzureCluster} request.azureCluster + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} to create. + * @param {string} request.azureClusterId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource name + * formatted as + * `projects//locations//azureClusters/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually create the cluster. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.create_azure_cluster.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async + */ + createAzureCluster( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAzureCluster( + request: protos.google.cloud.gkemulticloud.v1.ICreateAzureClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAzureCluster( + request: protos.google.cloud.gkemulticloud.v1.ICreateAzureClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAzureCluster( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureClusterRequest, + 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.createAzureCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAzureCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.create_azure_cluster.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async + */ + async checkCreateAzureClusterProgress(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.createAzureCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkemulticloud.v1.AzureCluster} request.azureCluster + * Required. The {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} + * resource to update. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually update the cluster. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}: + * + * * `description`. + * * `azureClient`. + * * `control_plane.version`. + * * `control_plane.vm_size`. + * * `annotations`. + * * `authorization.admin_users`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.update_azure_cluster.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async + */ + updateAzureCluster( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAzureClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAzureCluster( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAzureClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAzureCluster( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAzureClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAzureCluster( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAzureClusterRequest, + 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({ + 'azure_cluster.name': request.azureCluster!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAzureCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateAzureCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.update_azure_cluster.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async + */ + async checkUpdateAzureClusterProgress(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.updateAzureCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. + * + * Fails if the cluster has one or more associated + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} to delete. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {boolean} request.allowMissing + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed {@link google.longrunning.Operation|Operation} will be returned. + * + * Useful for idempotent deletion. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @param {string} request.etag + * The current etag of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.delete_azure_cluster.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async + */ + deleteAzureCluster( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClusterRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAzureCluster( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClusterRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAzureCluster( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClusterRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAzureCluster( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClusterRequest, + 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.deleteAzureCluster(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAzureCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.delete_azure_cluster.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async + */ + async checkDeleteAzureClusterProgress(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.deleteAzureCluster, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}, + * attached to a given + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} + * resource where this node pool will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {google.cloud.gkemulticloud.v1.AzureNodePool} request.azureNodePool + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} to create. + * @param {string} request.azureNodePoolId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource name + * formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually create the node + * pool. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.create_azure_node_pool.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async + */ + createAzureNodePool( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureNodePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAzureNodePool( + request: protos.google.cloud.gkemulticloud.v1.ICreateAzureNodePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAzureNodePool( + request: protos.google.cloud.gkemulticloud.v1.ICreateAzureNodePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAzureNodePool( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureNodePoolRequest, + 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.createAzureNodePool(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAzureNodePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.create_azure_node_pool.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async + */ + async checkCreateAzureNodePoolProgress(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.createAzureNodePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkemulticloud.v1.AzureNodePool} request.azureNodePool + * Required. The {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} + * resource to update. + * @param {boolean} request.validateOnly + * If set, only validate the request, but don't actually update the node pool. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}: + * + * *. `annotations`. + * * `version`. + * * `autoscaling.min_node_count`. + * * `autoscaling.max_node_count`. + * * `config.ssh_config.authorized_key`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.update_azure_node_pool.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async + */ + updateAzureNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAzureNodePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAzureNodePool( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAzureNodePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAzureNodePool( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAzureNodePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAzureNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAzureNodePoolRequest, + 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({ + 'azure_node_pool.name': request.azureNodePool!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAzureNodePool(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateAzureNodePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.update_azure_node_pool.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async + */ + async checkUpdateAzureNodePoolProgress(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.updateAzureNodePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} to delete. + * + * `AzureNodePool` names are formatted as + * `projects//locations//azureClusters//azureNodePools/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually delete the node + * pool. + * @param {boolean} request.allowMissing + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed {@link google.longrunning.Operation|Operation} will be + * returned. + * + * Useful for idempotent deletion. + * @param {string} request.etag + * The current ETag of the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided ETag does not match the current etag of the node pool, + * the request will fail and an ABORTED error will be returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.delete_azure_node_pool.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async + */ + deleteAzureNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureNodePoolRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAzureNodePool( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureNodePoolRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAzureNodePool( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureNodePoolRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAzureNodePool( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureNodePoolRequest, + 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.deleteAzureNodePool(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAzureNodePool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.delete_azure_node_pool.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async + */ + async checkDeleteAzureNodePoolProgress(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.deleteAzureNodePool, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} + * resources on a given Google Cloud project and region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [AzureClient]{@link google.cloud.gkemulticloud.v1.AzureClient}. + * 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 `listAzureClientsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAzureClients( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureClient[], + protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse + ]>; + listAzureClients( + request: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureClient>): void; + listAzureClients( + request: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureClient>): void; + listAzureClients( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureClient>, + callback?: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureClient>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureClient[], + protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + 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.listAzureClients(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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [AzureClient]{@link google.cloud.gkemulticloud.v1.AzureClient} 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 `listAzureClientsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAzureClientsStream( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + 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['listAzureClients']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAzureClients.createStream( + this.innerApiCalls.listAzureClients as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAzureClients`, 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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AzureClient]{@link google.cloud.gkemulticloud.v1.AzureClient}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.list_azure_clients.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async + */ + listAzureClientsAsync( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, + 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['listAzureClients']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAzureClients.asyncIterate( + this.innerApiCalls['listAzureClients'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} + * resources on a given Google Cloud project and region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [AzureCluster]{@link google.cloud.gkemulticloud.v1.AzureCluster}. + * 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 `listAzureClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAzureClusters( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureCluster[], + protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse + ]>; + listAzureClusters( + request: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureCluster>): void; + listAzureClusters( + request: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureCluster>): void; + listAzureClusters( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureCluster>, + callback?: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureCluster>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureCluster[], + protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + 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.listAzureClusters(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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [AzureCluster]{@link google.cloud.gkemulticloud.v1.AzureCluster} 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 `listAzureClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAzureClustersStream( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + 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['listAzureClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAzureClusters.createStream( + this.innerApiCalls.listAzureClusters as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAzureClusters`, 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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AzureCluster]{@link google.cloud.gkemulticloud.v1.AzureCluster}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.list_azure_clusters.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async + */ + listAzureClustersAsync( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, + 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['listAzureClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAzureClusters.asyncIterate( + this.innerApiCalls['listAzureClusters'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} + * resources on a given + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent `AzureCluster` which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [AzureNodePool]{@link google.cloud.gkemulticloud.v1.AzureNodePool}. + * 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 `listAzureNodePoolsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAzureNodePools( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureNodePool[], + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse + ]>; + listAzureNodePools( + request: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureNodePool>): void; + listAzureNodePools( + request: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureNodePool>): void; + listAzureNodePools( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureNodePool>, + callback?: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse|null|undefined, + protos.google.cloud.gkemulticloud.v1.IAzureNodePool>): + Promise<[ + protos.google.cloud.gkemulticloud.v1.IAzureNodePool[], + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest|null, + protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + 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.listAzureNodePools(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 `AzureCluster` which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [AzureNodePool]{@link google.cloud.gkemulticloud.v1.AzureNodePool} 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 `listAzureNodePoolsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAzureNodePoolsStream( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + 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['listAzureNodePools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAzureNodePools.createStream( + this.innerApiCalls.listAzureNodePools as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAzureNodePools`, 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 `AzureCluster` which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. + * + * `AzureCluster` names are formatted as + * `projects//locations//azureClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AzureNodePool]{@link google.cloud.gkemulticloud.v1.AzureNodePool}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/azure_clusters.list_azure_node_pools.js + * region_tag:gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async + */ + listAzureNodePoolsAsync( + request?: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, + 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['listAzureNodePools']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAzureNodePools.asyncIterate( + this.innerApiCalls['listAzureNodePools'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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. + * + * @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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} attached_cluster + * @returns {string} Resource name string. + */ + attachedClusterPath(project:string,location:string,attachedCluster:string) { + return this.pathTemplates.attachedClusterPathTemplate.render({ + project: project, + location: location, + attached_cluster: attachedCluster, + }); + } + + /** + * Parse the project from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).project; + } + + /** + * Parse the location from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).location; + } + + /** + * Parse the attached_cluster from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the attached_cluster. + */ + matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).attached_cluster; + } + + /** + * Return a fully-qualified attachedServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + attachedServerConfigPath(project:string,location:string) { + return this.pathTemplates.attachedServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).project; + } + + /** + * Parse the location from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).location; + } + + /** + * Return a fully-qualified awsCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aws_cluster + * @returns {string} Resource name string. + */ + awsClusterPath(project:string,location:string,awsCluster:string) { + return this.pathTemplates.awsClusterPathTemplate.render({ + project: project, + location: location, + aws_cluster: awsCluster, + }); + } + + /** + * Parse the project from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).project; + } + + /** + * Parse the location from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).location; + } + + /** + * Parse the aws_cluster from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the aws_cluster. + */ + matchAwsClusterFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).aws_cluster; + } + + /** + * Return a fully-qualified awsNodePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aws_cluster + * @param {string} aws_node_pool + * @returns {string} Resource name string. + */ + awsNodePoolPath(project:string,location:string,awsCluster:string,awsNodePool:string) { + return this.pathTemplates.awsNodePoolPathTemplate.render({ + project: project, + location: location, + aws_cluster: awsCluster, + aws_node_pool: awsNodePool, + }); + } + + /** + * Parse the project from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).project; + } + + /** + * Parse the location from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).location; + } + + /** + * Parse the aws_cluster from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the aws_cluster. + */ + matchAwsClusterFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_cluster; + } + + /** + * Parse the aws_node_pool from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the aws_node_pool. + */ + matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_node_pool; + } + + /** + * Return a fully-qualified awsServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + awsServerConfigPath(project:string,location:string) { + return this.pathTemplates.awsServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AwsServerConfig resource. + * + * @param {string} awsServerConfigName + * A fully-qualified path representing AwsServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsServerConfigName(awsServerConfigName: string) { + return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).project; + } + + /** + * Parse the location from AwsServerConfig resource. + * + * @param {string} awsServerConfigName + * A fully-qualified path representing AwsServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsServerConfigName(awsServerConfigName: string) { + return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).location; + } + + /** + * Return a fully-qualified azureClient resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_client + * @returns {string} Resource name string. + */ + azureClientPath(project:string,location:string,azureClient:string) { + return this.pathTemplates.azureClientPathTemplate.render({ + project: project, + location: location, + azure_client: azureClient, + }); + } + + /** + * Parse the project from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).project; + } + + /** + * Parse the location from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).location; + } + + /** + * Parse the azure_client from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the azure_client. + */ + matchAzureClientFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName).azure_client; + } + + /** + * Return a fully-qualified azureCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_cluster + * @returns {string} Resource name string. + */ + azureClusterPath(project:string,location:string,azureCluster:string) { + return this.pathTemplates.azureClusterPathTemplate.render({ + project: project, + location: location, + azure_cluster: azureCluster, + }); + } + + /** + * Parse the project from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).project; + } + + /** + * Parse the location from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).location; + } + + /** + * Parse the azure_cluster from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the azure_cluster. + */ + matchAzureClusterFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).azure_cluster; + } + + /** + * Return a fully-qualified azureNodePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_cluster + * @param {string} azure_node_pool + * @returns {string} Resource name string. + */ + azureNodePoolPath(project:string,location:string,azureCluster:string,azureNodePool:string) { + return this.pathTemplates.azureNodePoolPathTemplate.render({ + project: project, + location: location, + azure_cluster: azureCluster, + azure_node_pool: azureNodePool, + }); + } + + /** + * Parse the project from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).project; + } + + /** + * Parse the location from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).location; + } + + /** + * Parse the azure_cluster from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the azure_cluster. + */ + matchAzureClusterFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_cluster; + } + + /** + * Parse the azure_node_pool from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the azure_node_pool. + */ + matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_node_pool; + } + + /** + * Return a fully-qualified azureServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + azureServerConfigPath(project:string,location:string) { + return this.pathTemplates.azureServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AzureServerConfig resource. + * + * @param {string} azureServerConfigName + * A fully-qualified path representing AzureServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureServerConfigName(azureServerConfigName: string) { + return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).project; + } + + /** + * Parse the location from AzureServerConfig resource. + * + * @param {string} azureServerConfigName + * A fully-qualified path representing AzureServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureServerConfigName(azureServerConfigName: string) { + return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).location; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * 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.azureClustersStub && !this._terminated) { + return this.azureClustersStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client_config.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client_config.json new file mode 100644 index 00000000000..7467958f0d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client_config.json @@ -0,0 +1,118 @@ +{ + "interfaces": { + "google.cloud.gkemulticloud.v1.AzureClusters": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateAzureClient": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAzureClient": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAzureClients": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteAzureClient": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAzureCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAzureCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAzureCluster": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAzureClusters": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteAzureCluster": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GenerateAzureAccessToken": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateAzureNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAzureNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAzureNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAzureNodePools": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteAzureNodePool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAzureServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_proto_list.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_proto_list.json new file mode 100644 index 00000000000..288ec0e3d51 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_proto_list.json @@ -0,0 +1,9 @@ +[ + "../../protos/google/cloud/gkemulticloud/v1/attached_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/attached_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/aws_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/aws_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/azure_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/azure_service.proto", + "../../protos/google/cloud/gkemulticloud/v1/common_resources.proto" +] diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..11d19e83fb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/gapic_metadata.json @@ -0,0 +1,435 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.gkemulticloud.v1", + "libraryPackage": "@google-cloud/gkemulticloud", + "services": { + "AttachedClusters": { + "clients": { + "grpc": { + "libraryClient": "AttachedClustersClient", + "rpcs": { + "GetAttachedCluster": { + "methods": [ + "getAttachedCluster" + ] + }, + "GetAttachedServerConfig": { + "methods": [ + "getAttachedServerConfig" + ] + }, + "GenerateAttachedClusterInstallManifest": { + "methods": [ + "generateAttachedClusterInstallManifest" + ] + }, + "CreateAttachedCluster": { + "methods": [ + "createAttachedCluster" + ] + }, + "UpdateAttachedCluster": { + "methods": [ + "updateAttachedCluster" + ] + }, + "ImportAttachedCluster": { + "methods": [ + "importAttachedCluster" + ] + }, + "DeleteAttachedCluster": { + "methods": [ + "deleteAttachedCluster" + ] + }, + "ListAttachedClusters": { + "methods": [ + "listAttachedClusters", + "listAttachedClustersStream", + "listAttachedClustersAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AttachedClustersClient", + "rpcs": { + "GetAttachedCluster": { + "methods": [ + "getAttachedCluster" + ] + }, + "GetAttachedServerConfig": { + "methods": [ + "getAttachedServerConfig" + ] + }, + "GenerateAttachedClusterInstallManifest": { + "methods": [ + "generateAttachedClusterInstallManifest" + ] + }, + "CreateAttachedCluster": { + "methods": [ + "createAttachedCluster" + ] + }, + "UpdateAttachedCluster": { + "methods": [ + "updateAttachedCluster" + ] + }, + "ImportAttachedCluster": { + "methods": [ + "importAttachedCluster" + ] + }, + "DeleteAttachedCluster": { + "methods": [ + "deleteAttachedCluster" + ] + }, + "ListAttachedClusters": { + "methods": [ + "listAttachedClusters", + "listAttachedClustersStream", + "listAttachedClustersAsync" + ] + } + } + } + } + }, + "AwsClusters": { + "clients": { + "grpc": { + "libraryClient": "AwsClustersClient", + "rpcs": { + "GetAwsCluster": { + "methods": [ + "getAwsCluster" + ] + }, + "GenerateAwsAccessToken": { + "methods": [ + "generateAwsAccessToken" + ] + }, + "GetAwsNodePool": { + "methods": [ + "getAwsNodePool" + ] + }, + "GetAwsServerConfig": { + "methods": [ + "getAwsServerConfig" + ] + }, + "CreateAwsCluster": { + "methods": [ + "createAwsCluster" + ] + }, + "UpdateAwsCluster": { + "methods": [ + "updateAwsCluster" + ] + }, + "DeleteAwsCluster": { + "methods": [ + "deleteAwsCluster" + ] + }, + "CreateAwsNodePool": { + "methods": [ + "createAwsNodePool" + ] + }, + "UpdateAwsNodePool": { + "methods": [ + "updateAwsNodePool" + ] + }, + "DeleteAwsNodePool": { + "methods": [ + "deleteAwsNodePool" + ] + }, + "ListAwsClusters": { + "methods": [ + "listAwsClusters", + "listAwsClustersStream", + "listAwsClustersAsync" + ] + }, + "ListAwsNodePools": { + "methods": [ + "listAwsNodePools", + "listAwsNodePoolsStream", + "listAwsNodePoolsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AwsClustersClient", + "rpcs": { + "GetAwsCluster": { + "methods": [ + "getAwsCluster" + ] + }, + "GenerateAwsAccessToken": { + "methods": [ + "generateAwsAccessToken" + ] + }, + "GetAwsNodePool": { + "methods": [ + "getAwsNodePool" + ] + }, + "GetAwsServerConfig": { + "methods": [ + "getAwsServerConfig" + ] + }, + "CreateAwsCluster": { + "methods": [ + "createAwsCluster" + ] + }, + "UpdateAwsCluster": { + "methods": [ + "updateAwsCluster" + ] + }, + "DeleteAwsCluster": { + "methods": [ + "deleteAwsCluster" + ] + }, + "CreateAwsNodePool": { + "methods": [ + "createAwsNodePool" + ] + }, + "UpdateAwsNodePool": { + "methods": [ + "updateAwsNodePool" + ] + }, + "DeleteAwsNodePool": { + "methods": [ + "deleteAwsNodePool" + ] + }, + "ListAwsClusters": { + "methods": [ + "listAwsClusters", + "listAwsClustersStream", + "listAwsClustersAsync" + ] + }, + "ListAwsNodePools": { + "methods": [ + "listAwsNodePools", + "listAwsNodePoolsStream", + "listAwsNodePoolsAsync" + ] + } + } + } + } + }, + "AzureClusters": { + "clients": { + "grpc": { + "libraryClient": "AzureClustersClient", + "rpcs": { + "GetAzureClient": { + "methods": [ + "getAzureClient" + ] + }, + "GetAzureCluster": { + "methods": [ + "getAzureCluster" + ] + }, + "GenerateAzureAccessToken": { + "methods": [ + "generateAzureAccessToken" + ] + }, + "GetAzureNodePool": { + "methods": [ + "getAzureNodePool" + ] + }, + "GetAzureServerConfig": { + "methods": [ + "getAzureServerConfig" + ] + }, + "CreateAzureClient": { + "methods": [ + "createAzureClient" + ] + }, + "DeleteAzureClient": { + "methods": [ + "deleteAzureClient" + ] + }, + "CreateAzureCluster": { + "methods": [ + "createAzureCluster" + ] + }, + "UpdateAzureCluster": { + "methods": [ + "updateAzureCluster" + ] + }, + "DeleteAzureCluster": { + "methods": [ + "deleteAzureCluster" + ] + }, + "CreateAzureNodePool": { + "methods": [ + "createAzureNodePool" + ] + }, + "UpdateAzureNodePool": { + "methods": [ + "updateAzureNodePool" + ] + }, + "DeleteAzureNodePool": { + "methods": [ + "deleteAzureNodePool" + ] + }, + "ListAzureClients": { + "methods": [ + "listAzureClients", + "listAzureClientsStream", + "listAzureClientsAsync" + ] + }, + "ListAzureClusters": { + "methods": [ + "listAzureClusters", + "listAzureClustersStream", + "listAzureClustersAsync" + ] + }, + "ListAzureNodePools": { + "methods": [ + "listAzureNodePools", + "listAzureNodePoolsStream", + "listAzureNodePoolsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AzureClustersClient", + "rpcs": { + "GetAzureClient": { + "methods": [ + "getAzureClient" + ] + }, + "GetAzureCluster": { + "methods": [ + "getAzureCluster" + ] + }, + "GenerateAzureAccessToken": { + "methods": [ + "generateAzureAccessToken" + ] + }, + "GetAzureNodePool": { + "methods": [ + "getAzureNodePool" + ] + }, + "GetAzureServerConfig": { + "methods": [ + "getAzureServerConfig" + ] + }, + "CreateAzureClient": { + "methods": [ + "createAzureClient" + ] + }, + "DeleteAzureClient": { + "methods": [ + "deleteAzureClient" + ] + }, + "CreateAzureCluster": { + "methods": [ + "createAzureCluster" + ] + }, + "UpdateAzureCluster": { + "methods": [ + "updateAzureCluster" + ] + }, + "DeleteAzureCluster": { + "methods": [ + "deleteAzureCluster" + ] + }, + "CreateAzureNodePool": { + "methods": [ + "createAzureNodePool" + ] + }, + "UpdateAzureNodePool": { + "methods": [ + "updateAzureNodePool" + ] + }, + "DeleteAzureNodePool": { + "methods": [ + "deleteAzureNodePool" + ] + }, + "ListAzureClients": { + "methods": [ + "listAzureClients", + "listAzureClientsStream", + "listAzureClientsAsync" + ] + }, + "ListAzureClusters": { + "methods": [ + "listAzureClusters", + "listAzureClustersStream", + "listAzureClustersAsync" + ] + }, + "ListAzureNodePools": { + "methods": [ + "listAzureNodePools", + "listAzureNodePoolsStream", + "listAzureNodePoolsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/index.ts new file mode 100644 index 00000000000..fbd6ce70981 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/index.ts @@ -0,0 +1,21 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {AttachedClustersClient} from './attached_clusters_client'; +export {AwsClustersClient} from './aws_clusters_client'; +export {AzureClustersClient} from './azure_clusters_client'; diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..10315f4d268 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,29 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const gkemulticloud = require('@google-cloud/gkemulticloud'); + +function main() { + const attachedClustersClient = new gkemulticloud.AttachedClustersClient(); + const awsClustersClient = new gkemulticloud.AwsClustersClient(); + const azureClustersClient = new gkemulticloud.AzureClustersClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..8fe569ff731 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,44 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {AttachedClustersClient, AwsClustersClient, AzureClustersClient} from '@google-cloud/gkemulticloud'; + +// check that the client class type name can be used +function doStuffWithAttachedClustersClient(client: AttachedClustersClient) { + client.close(); +} +function doStuffWithAwsClustersClient(client: AwsClustersClient) { + client.close(); +} +function doStuffWithAzureClustersClient(client: AzureClustersClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const attachedClustersClient = new AttachedClustersClient(); + doStuffWithAttachedClustersClient(attachedClustersClient); + // check that the client instance can be created + const awsClustersClient = new AwsClustersClient(); + doStuffWithAwsClustersClient(awsClustersClient); + // check that the client instance can be created + const azureClustersClient = new AzureClustersClient(); + doStuffWithAzureClustersClient(azureClustersClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/install.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/install.ts new file mode 100644 index 00000000000..557a57558e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_attached_clusters_v1.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_attached_clusters_v1.ts new file mode 100644 index 00000000000..ade3fa78021 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_attached_clusters_v1.ts @@ -0,0 +1,2134 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as attachedclustersModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .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.AttachedClustersClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = attachedclustersModule.v1.AttachedClustersClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = attachedclustersModule.v1.AttachedClustersClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = attachedclustersModule.v1.AttachedClustersClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new attachedclustersModule.v1.AttachedClustersClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.attachedClustersStub, undefined); + await client.initialize(); + assert(client.attachedClustersStub); + }); + + it('has close method for the initialized client', done => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.attachedClustersStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.attachedClustersStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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('getAttachedCluster', () => { + it('invokes getAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ); + client.innerApiCalls.getAttachedCluster = stubSimpleCall(expectedResponse); + const [response] = await client.getAttachedCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ); + client.innerApiCalls.getAttachedCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAttachedCluster( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAttachedCluster|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedCluster with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAttachedCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAttachedCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.getAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedCluster with closed client', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAttachedCluster(request), expectedError); + }); + }); + + describe('getAttachedServerConfig', () => { + it('invokes getAttachedServerConfig without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedServerConfig() + ); + client.innerApiCalls.getAttachedServerConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getAttachedServerConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAttachedServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachedServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedServerConfig without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedServerConfig() + ); + client.innerApiCalls.getAttachedServerConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAttachedServerConfig( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAttachedServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachedServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedServerConfig with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAttachedServerConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAttachedServerConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getAttachedServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAttachedServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedServerConfig with closed client', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAttachedServerConfig(request), expectedError); + }); + }); + + describe('generateAttachedClusterInstallManifest', () => { + it('invokes generateAttachedClusterInstallManifest without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse() + ); + client.innerApiCalls.generateAttachedClusterInstallManifest = stubSimpleCall(expectedResponse); + const [response] = await client.generateAttachedClusterInstallManifest(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAttachedClusterInstallManifest without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse() + ); + client.innerApiCalls.generateAttachedClusterInstallManifest = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateAttachedClusterInstallManifest( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAttachedClusterInstallManifest with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateAttachedClusterInstallManifest = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.generateAttachedClusterInstallManifest(request), expectedError); + const actualRequest = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAttachedClusterInstallManifest with closed client', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.generateAttachedClusterInstallManifest(request), expectedError); + }); + }); + + describe('createAttachedCluster', () => { + it('invokes createAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAttachedCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAttachedCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAttachedCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAttachedCluster( + 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.createAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachedCluster with call error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAttachedCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAttachedCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.createAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachedCluster with LRO error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAttachedCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAttachedCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAttachedClusterProgress without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkCreateAttachedClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAttachedClusterProgress with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkCreateAttachedClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAttachedCluster', () => { + it('invokes updateAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() + ); + request.attachedCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', ['attachedCluster', 'name']); + request.attachedCluster.name = defaultValue1; + const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAttachedCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAttachedCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() + ); + request.attachedCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', ['attachedCluster', 'name']); + request.attachedCluster.name = defaultValue1; + const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAttachedCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAttachedCluster( + 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.updateAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttachedCluster with call error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() + ); + request.attachedCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', ['attachedCluster', 'name']); + request.attachedCluster.name = defaultValue1; + const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAttachedCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAttachedCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttachedCluster with LRO error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() + ); + request.attachedCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', ['attachedCluster', 'name']); + request.attachedCluster.name = defaultValue1; + const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAttachedCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAttachedCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAttachedClusterProgress without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkUpdateAttachedClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAttachedClusterProgress with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkUpdateAttachedClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('importAttachedCluster', () => { + it('invokes importAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importAttachedCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.importAttachedCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importAttachedCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importAttachedCluster( + 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.importAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAttachedCluster with call error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importAttachedCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.importAttachedCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.importAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAttachedCluster with LRO error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importAttachedCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.importAttachedCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.importAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportAttachedClusterProgress without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkImportAttachedClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportAttachedClusterProgress with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkImportAttachedClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAttachedCluster', () => { + it('invokes deleteAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAttachedCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAttachedCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAttachedCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAttachedCluster( + 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.deleteAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachedCluster with call error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAttachedCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAttachedCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachedCluster with LRO error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAttachedCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAttachedCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAttachedCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachedCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAttachedClusterProgress without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkDeleteAttachedClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAttachedClusterProgress with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkDeleteAttachedClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAttachedClusters', () => { + it('invokes listAttachedClusters without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + ]; + client.innerApiCalls.listAttachedClusters = stubSimpleCall(expectedResponse); + const [response] = await client.listAttachedClusters(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAttachedClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAttachedClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachedClusters without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + ]; + client.innerApiCalls.listAttachedClusters = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAttachedClusters( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAttachedCluster[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAttachedClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAttachedClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachedClusters with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAttachedClusters = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAttachedClusters(request), expectedError); + const actualRequest = (client.innerApiCalls.listAttachedClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAttachedClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachedClustersStream without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + ]; + client.descriptors.page.listAttachedClusters.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAttachedClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AttachedCluster[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AttachedCluster) => { + 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.listAttachedClusters.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAttachedClusters, request)); + assert( + (client.descriptors.page.listAttachedClusters.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAttachedClustersStream with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAttachedClusters.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAttachedClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AttachedCluster[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AttachedCluster) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAttachedClusters.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAttachedClusters, request)); + assert( + (client.descriptors.page.listAttachedClusters.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAttachedClusters without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), + ]; + client.descriptors.page.listAttachedClusters.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkemulticloud.v1.IAttachedCluster[] = []; + const iterable = client.listAttachedClustersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAttachedClusters with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAttachedClusters.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAttachedClustersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkemulticloud.v1.IAttachedCluster[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAttachedClusters.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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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('attachedCluster', () => { + const fakePath = "/rendered/path/attachedCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + attached_cluster: "attachedClusterValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.attachedClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('attachedClusterPath', () => { + const result = client.attachedClusterPath("projectValue", "locationValue", "attachedClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAttachedClusterName', () => { + const result = client.matchProjectFromAttachedClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAttachedClusterName', () => { + const result = client.matchLocationFromAttachedClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAttachedClusterFromAttachedClusterName', () => { + const result = client.matchAttachedClusterFromAttachedClusterName(fakePath); + assert.strictEqual(result, "attachedClusterValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('attachedServerConfig', () => { + const fakePath = "/rendered/path/attachedServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.attachedServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('attachedServerConfigPath', () => { + const result = client.attachedServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.attachedServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAttachedServerConfigName', () => { + const result = client.matchProjectFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAttachedServerConfigName', () => { + const result = client.matchLocationFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsCluster', () => { + const fakePath = "/rendered/path/awsCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aws_cluster: "awsClusterValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsClusterPath', () => { + const result = client.awsClusterPath("projectValue", "locationValue", "awsClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsClusterName', () => { + const result = client.matchProjectFromAwsClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsClusterName', () => { + const result = client.matchLocationFromAwsClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsClusterFromAwsClusterName', () => { + const result = client.matchAwsClusterFromAwsClusterName(fakePath); + assert.strictEqual(result, "awsClusterValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsNodePool', () => { + const fakePath = "/rendered/path/awsNodePool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aws_cluster: "awsClusterValue", + aws_node_pool: "awsNodePoolValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsNodePoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsNodePoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsNodePoolPath', () => { + const result = client.awsNodePoolPath("projectValue", "locationValue", "awsClusterValue", "awsNodePoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsNodePoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsNodePoolName', () => { + const result = client.matchProjectFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsNodePoolName', () => { + const result = client.matchLocationFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsClusterFromAwsNodePoolName', () => { + const result = client.matchAwsClusterFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "awsClusterValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsNodePoolFromAwsNodePoolName', () => { + const result = client.matchAwsNodePoolFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "awsNodePoolValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsServerConfig', () => { + const fakePath = "/rendered/path/awsServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsServerConfigPath', () => { + const result = client.awsServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsServerConfigName', () => { + const result = client.matchProjectFromAwsServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsServerConfigName', () => { + const result = client.matchLocationFromAwsServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureClient', () => { + const fakePath = "/rendered/path/azureClient"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_client: "azureClientValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureClientPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureClientPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureClientPath', () => { + const result = client.azureClientPath("projectValue", "locationValue", "azureClientValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureClientPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureClientName', () => { + const result = client.matchProjectFromAzureClientName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureClientName', () => { + const result = client.matchLocationFromAzureClientName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClientFromAzureClientName', () => { + const result = client.matchAzureClientFromAzureClientName(fakePath); + assert.strictEqual(result, "azureClientValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureCluster', () => { + const fakePath = "/rendered/path/azureCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_cluster: "azureClusterValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureClusterPath', () => { + const result = client.azureClusterPath("projectValue", "locationValue", "azureClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureClusterName', () => { + const result = client.matchProjectFromAzureClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureClusterName', () => { + const result = client.matchLocationFromAzureClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClusterFromAzureClusterName', () => { + const result = client.matchAzureClusterFromAzureClusterName(fakePath); + assert.strictEqual(result, "azureClusterValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureNodePool', () => { + const fakePath = "/rendered/path/azureNodePool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_cluster: "azureClusterValue", + azure_node_pool: "azureNodePoolValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureNodePoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureNodePoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureNodePoolPath', () => { + const result = client.azureNodePoolPath("projectValue", "locationValue", "azureClusterValue", "azureNodePoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureNodePoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureNodePoolName', () => { + const result = client.matchProjectFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureNodePoolName', () => { + const result = client.matchLocationFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClusterFromAzureNodePoolName', () => { + const result = client.matchAzureClusterFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "azureClusterValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureNodePoolFromAzureNodePoolName', () => { + const result = client.matchAzureNodePoolFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "azureNodePoolValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureServerConfig', () => { + const fakePath = "/rendered/path/azureServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureServerConfigPath', () => { + const result = client.azureServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureServerConfigName', () => { + const result = client.matchProjectFromAzureServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureServerConfigName', () => { + const result = client.matchLocationFromAzureServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_aws_clusters_v1.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_aws_clusters_v1.ts new file mode 100644 index 00000000000..d4d9d959bbf --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_aws_clusters_v1.ts @@ -0,0 +1,2799 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as awsclustersModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .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.AwsClustersClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = awsclustersModule.v1.AwsClustersClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = awsclustersModule.v1.AwsClustersClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = awsclustersModule.v1.AwsClustersClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new awsclustersModule.v1.AwsClustersClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.awsClustersStub, undefined); + await client.initialize(); + assert(client.awsClustersStub); + }); + + it('has close method for the initialized client', done => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.awsClustersStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.awsClustersStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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('getAwsCluster', () => { + it('invokes getAwsCluster without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AwsCluster() + ); + client.innerApiCalls.getAwsCluster = stubSimpleCall(expectedResponse); + const [response] = await client.getAwsCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsCluster without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AwsCluster() + ); + client.innerApiCalls.getAwsCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAwsCluster( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsCluster|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsCluster with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAwsCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAwsCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.getAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsCluster with closed client', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsClusterRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAwsCluster(request), expectedError); + }); + }); + + describe('generateAwsAccessToken', () => { + it('invokes generateAwsAccessToken without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest', ['awsCluster']); + request.awsCluster = defaultValue1; + const expectedHeaderRequestParams = `aws_cluster=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse() + ); + client.innerApiCalls.generateAwsAccessToken = stubSimpleCall(expectedResponse); + const [response] = await client.generateAwsAccessToken(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateAwsAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAwsAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAwsAccessToken without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest', ['awsCluster']); + request.awsCluster = defaultValue1; + const expectedHeaderRequestParams = `aws_cluster=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse() + ); + client.innerApiCalls.generateAwsAccessToken = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateAwsAccessToken( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateAwsAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAwsAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAwsAccessToken with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest', ['awsCluster']); + request.awsCluster = defaultValue1; + const expectedHeaderRequestParams = `aws_cluster=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateAwsAccessToken = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.generateAwsAccessToken(request), expectedError); + const actualRequest = (client.innerApiCalls.generateAwsAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAwsAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAwsAccessToken with closed client', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest', ['awsCluster']); + request.awsCluster = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.generateAwsAccessToken(request), expectedError); + }); + }); + + describe('getAwsNodePool', () => { + it('invokes getAwsNodePool without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AwsNodePool() + ); + client.innerApiCalls.getAwsNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.getAwsNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsNodePool without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AwsNodePool() + ); + client.innerApiCalls.getAwsNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAwsNodePool( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsNodePool|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsNodePool with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAwsNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAwsNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.getAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsNodePool with closed client', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAwsNodePool(request), expectedError); + }); + }); + + describe('getAwsServerConfig', () => { + it('invokes getAwsServerConfig without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AwsServerConfig() + ); + client.innerApiCalls.getAwsServerConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getAwsServerConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAwsServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsServerConfig without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AwsServerConfig() + ); + client.innerApiCalls.getAwsServerConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAwsServerConfig( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsServerConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAwsServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsServerConfig with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAwsServerConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAwsServerConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getAwsServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAwsServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAwsServerConfig with closed client', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAwsServerConfig(request), expectedError); + }); + }); + + describe('createAwsCluster', () => { + it('invokes createAwsCluster without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAwsCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAwsCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAwsCluster without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAwsCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAwsCluster( + 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.createAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAwsCluster with call error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAwsCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAwsCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.createAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAwsCluster with LRO error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAwsCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAwsCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAwsClusterProgress without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkCreateAwsClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAwsClusterProgress with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkCreateAwsClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAwsCluster', () => { + it('invokes updateAwsCluster without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() + ); + request.awsCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest', ['awsCluster', 'name']); + request.awsCluster.name = defaultValue1; + const expectedHeaderRequestParams = `aws_cluster.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAwsCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAwsCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAwsCluster without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() + ); + request.awsCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest', ['awsCluster', 'name']); + request.awsCluster.name = defaultValue1; + const expectedHeaderRequestParams = `aws_cluster.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAwsCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAwsCluster( + 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.updateAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAwsCluster with call error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() + ); + request.awsCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest', ['awsCluster', 'name']); + request.awsCluster.name = defaultValue1; + const expectedHeaderRequestParams = `aws_cluster.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAwsCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAwsCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAwsCluster with LRO error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() + ); + request.awsCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest', ['awsCluster', 'name']); + request.awsCluster.name = defaultValue1; + const expectedHeaderRequestParams = `aws_cluster.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAwsCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAwsCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAwsClusterProgress without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkUpdateAwsClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAwsClusterProgress with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkUpdateAwsClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAwsCluster', () => { + it('invokes deleteAwsCluster without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAwsCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAwsCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAwsCluster without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAwsCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAwsCluster( + 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.deleteAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAwsCluster with call error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAwsCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAwsCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAwsCluster with LRO error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAwsCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAwsCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAwsCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAwsClusterProgress without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkDeleteAwsClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAwsClusterProgress with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkDeleteAwsClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createAwsNodePool', () => { + it('invokes createAwsNodePool without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAwsNodePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAwsNodePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAwsNodePool without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAwsNodePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAwsNodePool( + 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.createAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAwsNodePool with call error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAwsNodePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAwsNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.createAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAwsNodePool with LRO error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAwsNodePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAwsNodePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAwsNodePoolProgress without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkCreateAwsNodePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAwsNodePoolProgress with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkCreateAwsNodePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAwsNodePool', () => { + it('invokes updateAwsNodePool without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() + ); + request.awsNodePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest', ['awsNodePool', 'name']); + request.awsNodePool.name = defaultValue1; + const expectedHeaderRequestParams = `aws_node_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAwsNodePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAwsNodePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAwsNodePool without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() + ); + request.awsNodePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest', ['awsNodePool', 'name']); + request.awsNodePool.name = defaultValue1; + const expectedHeaderRequestParams = `aws_node_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAwsNodePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAwsNodePool( + 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.updateAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAwsNodePool with call error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() + ); + request.awsNodePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest', ['awsNodePool', 'name']); + request.awsNodePool.name = defaultValue1; + const expectedHeaderRequestParams = `aws_node_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAwsNodePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAwsNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAwsNodePool with LRO error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() + ); + request.awsNodePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest', ['awsNodePool', 'name']); + request.awsNodePool.name = defaultValue1; + const expectedHeaderRequestParams = `aws_node_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAwsNodePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAwsNodePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAwsNodePoolProgress without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkUpdateAwsNodePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAwsNodePoolProgress with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkUpdateAwsNodePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAwsNodePool', () => { + it('invokes deleteAwsNodePool without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAwsNodePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAwsNodePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAwsNodePool without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAwsNodePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAwsNodePool( + 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.deleteAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAwsNodePool with call error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAwsNodePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAwsNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAwsNodePool with LRO error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAwsNodePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAwsNodePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAwsNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAwsNodePoolProgress without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkDeleteAwsNodePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAwsNodePoolProgress with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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.checkDeleteAwsNodePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAwsClusters', () => { + it('invokes listAwsClusters without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + ]; + client.innerApiCalls.listAwsClusters = stubSimpleCall(expectedResponse); + const [response] = await client.listAwsClusters(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAwsClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAwsClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAwsClusters without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + ]; + client.innerApiCalls.listAwsClusters = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAwsClusters( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsCluster[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAwsClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAwsClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAwsClusters with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAwsClusters = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAwsClusters(request), expectedError); + const actualRequest = (client.innerApiCalls.listAwsClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAwsClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAwsClustersStream without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + ]; + client.descriptors.page.listAwsClusters.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAwsClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AwsCluster[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AwsCluster) => { + 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.listAwsClusters.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAwsClusters, request)); + assert( + (client.descriptors.page.listAwsClusters.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAwsClustersStream with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAwsClusters.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAwsClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AwsCluster[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AwsCluster) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAwsClusters.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAwsClusters, request)); + assert( + (client.descriptors.page.listAwsClusters.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAwsClusters without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), + ]; + client.descriptors.page.listAwsClusters.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkemulticloud.v1.IAwsCluster[] = []; + const iterable = client.listAwsClustersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAwsClusters.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAwsClusters.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAwsClusters with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAwsClusters.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAwsClustersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkemulticloud.v1.IAwsCluster[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAwsClusters.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAwsClusters.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAwsNodePools', () => { + it('invokes listAwsNodePools without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + ]; + client.innerApiCalls.listAwsNodePools = stubSimpleCall(expectedResponse); + const [response] = await client.listAwsNodePools(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAwsNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAwsNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAwsNodePools without error using callback', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + ]; + client.innerApiCalls.listAwsNodePools = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAwsNodePools( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsNodePool[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAwsNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAwsNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAwsNodePools with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAwsNodePools = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAwsNodePools(request), expectedError); + const actualRequest = (client.innerApiCalls.listAwsNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAwsNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAwsNodePoolsStream without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + ]; + client.descriptors.page.listAwsNodePools.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAwsNodePoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AwsNodePool[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AwsNodePool) => { + 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.listAwsNodePools.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAwsNodePools, request)); + assert( + (client.descriptors.page.listAwsNodePools.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAwsNodePoolsStream with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAwsNodePools.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAwsNodePoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AwsNodePool[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AwsNodePool) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAwsNodePools.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAwsNodePools, request)); + assert( + (client.descriptors.page.listAwsNodePools.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAwsNodePools without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), + ]; + client.descriptors.page.listAwsNodePools.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkemulticloud.v1.IAwsNodePool[] = []; + const iterable = client.listAwsNodePoolsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAwsNodePools.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAwsNodePools.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAwsNodePools with error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAwsNodePools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAwsNodePoolsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkemulticloud.v1.IAwsNodePool[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAwsNodePools.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAwsNodePools.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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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('attachedCluster', () => { + const fakePath = "/rendered/path/attachedCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + attached_cluster: "attachedClusterValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.attachedClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('attachedClusterPath', () => { + const result = client.attachedClusterPath("projectValue", "locationValue", "attachedClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAttachedClusterName', () => { + const result = client.matchProjectFromAttachedClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAttachedClusterName', () => { + const result = client.matchLocationFromAttachedClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAttachedClusterFromAttachedClusterName', () => { + const result = client.matchAttachedClusterFromAttachedClusterName(fakePath); + assert.strictEqual(result, "attachedClusterValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('attachedServerConfig', () => { + const fakePath = "/rendered/path/attachedServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.attachedServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('attachedServerConfigPath', () => { + const result = client.attachedServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.attachedServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAttachedServerConfigName', () => { + const result = client.matchProjectFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAttachedServerConfigName', () => { + const result = client.matchLocationFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsCluster', () => { + const fakePath = "/rendered/path/awsCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aws_cluster: "awsClusterValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsClusterPath', () => { + const result = client.awsClusterPath("projectValue", "locationValue", "awsClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsClusterName', () => { + const result = client.matchProjectFromAwsClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsClusterName', () => { + const result = client.matchLocationFromAwsClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsClusterFromAwsClusterName', () => { + const result = client.matchAwsClusterFromAwsClusterName(fakePath); + assert.strictEqual(result, "awsClusterValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsNodePool', () => { + const fakePath = "/rendered/path/awsNodePool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aws_cluster: "awsClusterValue", + aws_node_pool: "awsNodePoolValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsNodePoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsNodePoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsNodePoolPath', () => { + const result = client.awsNodePoolPath("projectValue", "locationValue", "awsClusterValue", "awsNodePoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsNodePoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsNodePoolName', () => { + const result = client.matchProjectFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsNodePoolName', () => { + const result = client.matchLocationFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsClusterFromAwsNodePoolName', () => { + const result = client.matchAwsClusterFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "awsClusterValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsNodePoolFromAwsNodePoolName', () => { + const result = client.matchAwsNodePoolFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "awsNodePoolValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsServerConfig', () => { + const fakePath = "/rendered/path/awsServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsServerConfigPath', () => { + const result = client.awsServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsServerConfigName', () => { + const result = client.matchProjectFromAwsServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsServerConfigName', () => { + const result = client.matchLocationFromAwsServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureClient', () => { + const fakePath = "/rendered/path/azureClient"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_client: "azureClientValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureClientPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureClientPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureClientPath', () => { + const result = client.azureClientPath("projectValue", "locationValue", "azureClientValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureClientPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureClientName', () => { + const result = client.matchProjectFromAzureClientName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureClientName', () => { + const result = client.matchLocationFromAzureClientName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClientFromAzureClientName', () => { + const result = client.matchAzureClientFromAzureClientName(fakePath); + assert.strictEqual(result, "azureClientValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureCluster', () => { + const fakePath = "/rendered/path/azureCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_cluster: "azureClusterValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureClusterPath', () => { + const result = client.azureClusterPath("projectValue", "locationValue", "azureClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureClusterName', () => { + const result = client.matchProjectFromAzureClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureClusterName', () => { + const result = client.matchLocationFromAzureClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClusterFromAzureClusterName', () => { + const result = client.matchAzureClusterFromAzureClusterName(fakePath); + assert.strictEqual(result, "azureClusterValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureNodePool', () => { + const fakePath = "/rendered/path/azureNodePool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_cluster: "azureClusterValue", + azure_node_pool: "azureNodePoolValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureNodePoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureNodePoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureNodePoolPath', () => { + const result = client.azureNodePoolPath("projectValue", "locationValue", "azureClusterValue", "azureNodePoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureNodePoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureNodePoolName', () => { + const result = client.matchProjectFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureNodePoolName', () => { + const result = client.matchLocationFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClusterFromAzureNodePoolName', () => { + const result = client.matchAzureClusterFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "azureClusterValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureNodePoolFromAzureNodePoolName', () => { + const result = client.matchAzureNodePoolFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "azureNodePoolValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureServerConfig', () => { + const fakePath = "/rendered/path/azureServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureServerConfigPath', () => { + const result = client.azureServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureServerConfigName', () => { + const result = client.matchProjectFromAzureServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureServerConfigName', () => { + const result = client.matchLocationFromAzureServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + 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)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_azure_clusters_v1.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_azure_clusters_v1.ts new file mode 100644 index 00000000000..ce9abd1aef5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_azure_clusters_v1.ts @@ -0,0 +1,3460 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as azureclustersModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .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.AzureClustersClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = azureclustersModule.v1.AzureClustersClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = azureclustersModule.v1.AzureClustersClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = azureclustersModule.v1.AzureClustersClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new azureclustersModule.v1.AzureClustersClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.azureClustersStub, undefined); + await client.initialize(); + assert(client.azureClustersStub); + }); + + it('has close method for the initialized client', done => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.azureClustersStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.azureClustersStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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('getAzureClient', () => { + it('invokes getAzureClient without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClientRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AzureClient() + ); + client.innerApiCalls.getAzureClient = stubSimpleCall(expectedResponse); + const [response] = await client.getAzureClient(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureClient without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClientRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AzureClient() + ); + client.innerApiCalls.getAzureClient = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAzureClient( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureClient|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureClient with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClientRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAzureClient = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAzureClient(request), expectedError); + const actualRequest = (client.innerApiCalls.getAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureClient with closed client', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClientRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAzureClient(request), expectedError); + }); + }); + + describe('getAzureCluster', () => { + it('invokes getAzureCluster without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AzureCluster() + ); + client.innerApiCalls.getAzureCluster = stubSimpleCall(expectedResponse); + const [response] = await client.getAzureCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureCluster without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AzureCluster() + ); + client.innerApiCalls.getAzureCluster = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAzureCluster( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureCluster|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureCluster with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAzureCluster = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAzureCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.getAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureCluster with closed client', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClusterRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAzureCluster(request), expectedError); + }); + }); + + describe('generateAzureAccessToken', () => { + it('invokes generateAzureAccessToken without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest', ['azureCluster']); + request.azureCluster = defaultValue1; + const expectedHeaderRequestParams = `azure_cluster=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse() + ); + client.innerApiCalls.generateAzureAccessToken = stubSimpleCall(expectedResponse); + const [response] = await client.generateAzureAccessToken(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateAzureAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAzureAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAzureAccessToken without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest', ['azureCluster']); + request.azureCluster = defaultValue1; + const expectedHeaderRequestParams = `azure_cluster=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse() + ); + client.innerApiCalls.generateAzureAccessToken = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateAzureAccessToken( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateAzureAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAzureAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAzureAccessToken with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest', ['azureCluster']); + request.azureCluster = defaultValue1; + const expectedHeaderRequestParams = `azure_cluster=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateAzureAccessToken = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.generateAzureAccessToken(request), expectedError); + const actualRequest = (client.innerApiCalls.generateAzureAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateAzureAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAzureAccessToken with closed client', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest', ['azureCluster']); + request.azureCluster = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.generateAzureAccessToken(request), expectedError); + }); + }); + + describe('getAzureNodePool', () => { + it('invokes getAzureNodePool without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AzureNodePool() + ); + client.innerApiCalls.getAzureNodePool = stubSimpleCall(expectedResponse); + const [response] = await client.getAzureNodePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureNodePool without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AzureNodePool() + ); + client.innerApiCalls.getAzureNodePool = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAzureNodePool( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureNodePool|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureNodePool with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAzureNodePool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAzureNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.getAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureNodePool with closed client', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAzureNodePool(request), expectedError); + }); + }); + + describe('getAzureServerConfig', () => { + it('invokes getAzureServerConfig without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AzureServerConfig() + ); + client.innerApiCalls.getAzureServerConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getAzureServerConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAzureServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureServerConfig without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AzureServerConfig() + ); + client.innerApiCalls.getAzureServerConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAzureServerConfig( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureServerConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAzureServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureServerConfig with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAzureServerConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAzureServerConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getAzureServerConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAzureServerConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAzureServerConfig with closed client', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAzureServerConfig(request), expectedError); + }); + }); + + describe('createAzureClient', () => { + it('invokes createAzureClient without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClientRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAzureClient = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAzureClient(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureClient without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClientRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAzureClient = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAzureClient( + 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.createAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureClient with call error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClientRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAzureClient = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAzureClient(request), expectedError); + const actualRequest = (client.innerApiCalls.createAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureClient with LRO error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClientRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAzureClient = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAzureClient(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAzureClientProgress without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkCreateAzureClientProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAzureClientProgress with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkCreateAzureClientProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAzureClient', () => { + it('invokes deleteAzureClient without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAzureClient = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAzureClient(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureClient without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAzureClient = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAzureClient( + 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.deleteAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureClient with call error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAzureClient = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAzureClient(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureClient with LRO error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAzureClient = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAzureClient(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAzureClient as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureClient as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAzureClientProgress without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkDeleteAzureClientProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAzureClientProgress with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkDeleteAzureClientProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createAzureCluster', () => { + it('invokes createAzureCluster without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAzureCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAzureCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureCluster without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAzureCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAzureCluster( + 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.createAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureCluster with call error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAzureCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAzureCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.createAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureCluster with LRO error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAzureCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAzureCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAzureClusterProgress without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkCreateAzureClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAzureClusterProgress with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkCreateAzureClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAzureCluster', () => { + it('invokes updateAzureCluster without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() + ); + request.azureCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest', ['azureCluster', 'name']); + request.azureCluster.name = defaultValue1; + const expectedHeaderRequestParams = `azure_cluster.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAzureCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAzureCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAzureCluster without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() + ); + request.azureCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest', ['azureCluster', 'name']); + request.azureCluster.name = defaultValue1; + const expectedHeaderRequestParams = `azure_cluster.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAzureCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAzureCluster( + 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.updateAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAzureCluster with call error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() + ); + request.azureCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest', ['azureCluster', 'name']); + request.azureCluster.name = defaultValue1; + const expectedHeaderRequestParams = `azure_cluster.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAzureCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAzureCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAzureCluster with LRO error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() + ); + request.azureCluster ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest', ['azureCluster', 'name']); + request.azureCluster.name = defaultValue1; + const expectedHeaderRequestParams = `azure_cluster.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAzureCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAzureCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAzureClusterProgress without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkUpdateAzureClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAzureClusterProgress with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkUpdateAzureClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAzureCluster', () => { + it('invokes deleteAzureCluster without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAzureCluster = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAzureCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureCluster without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAzureCluster = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAzureCluster( + 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.deleteAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureCluster with call error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAzureCluster = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAzureCluster(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureCluster with LRO error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAzureCluster = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAzureCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAzureCluster as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureCluster as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAzureClusterProgress without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkDeleteAzureClusterProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAzureClusterProgress with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkDeleteAzureClusterProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createAzureNodePool', () => { + it('invokes createAzureNodePool without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAzureNodePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAzureNodePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureNodePool without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAzureNodePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAzureNodePool( + 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.createAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureNodePool with call error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAzureNodePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAzureNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.createAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAzureNodePool with LRO error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAzureNodePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAzureNodePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAzureNodePoolProgress without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkCreateAzureNodePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAzureNodePoolProgress with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkCreateAzureNodePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAzureNodePool', () => { + it('invokes updateAzureNodePool without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() + ); + request.azureNodePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest', ['azureNodePool', 'name']); + request.azureNodePool.name = defaultValue1; + const expectedHeaderRequestParams = `azure_node_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAzureNodePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAzureNodePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAzureNodePool without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() + ); + request.azureNodePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest', ['azureNodePool', 'name']); + request.azureNodePool.name = defaultValue1; + const expectedHeaderRequestParams = `azure_node_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAzureNodePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAzureNodePool( + 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.updateAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAzureNodePool with call error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() + ); + request.azureNodePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest', ['azureNodePool', 'name']); + request.azureNodePool.name = defaultValue1; + const expectedHeaderRequestParams = `azure_node_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAzureNodePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAzureNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAzureNodePool with LRO error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() + ); + request.azureNodePool ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest', ['azureNodePool', 'name']); + request.azureNodePool.name = defaultValue1; + const expectedHeaderRequestParams = `azure_node_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAzureNodePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAzureNodePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAzureNodePoolProgress without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkUpdateAzureNodePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAzureNodePoolProgress with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkUpdateAzureNodePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAzureNodePool', () => { + it('invokes deleteAzureNodePool without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAzureNodePool = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAzureNodePool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureNodePool without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAzureNodePool = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAzureNodePool( + 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.deleteAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureNodePool with call error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAzureNodePool = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAzureNodePool(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAzureNodePool with LRO error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAzureNodePool = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAzureNodePool(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAzureNodePool as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureNodePool as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAzureNodePoolProgress without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkDeleteAzureNodePoolProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAzureNodePoolProgress with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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.checkDeleteAzureNodePoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listAzureClients', () => { + it('invokes listAzureClients without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + ]; + client.innerApiCalls.listAzureClients = stubSimpleCall(expectedResponse); + const [response] = await client.listAzureClients(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAzureClients as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureClients as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureClients without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + ]; + client.innerApiCalls.listAzureClients = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAzureClients( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureClient[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAzureClients as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureClients as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureClients with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAzureClients = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAzureClients(request), expectedError); + const actualRequest = (client.innerApiCalls.listAzureClients as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureClients as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureClientsStream without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + ]; + client.descriptors.page.listAzureClients.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAzureClientsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AzureClient[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureClient) => { + 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.listAzureClients.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAzureClients, request)); + assert( + (client.descriptors.page.listAzureClients.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAzureClientsStream with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAzureClients.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAzureClientsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AzureClient[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureClient) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAzureClients.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAzureClients, request)); + assert( + (client.descriptors.page.listAzureClients.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAzureClients without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), + ]; + client.descriptors.page.listAzureClients.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkemulticloud.v1.IAzureClient[] = []; + const iterable = client.listAzureClientsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAzureClients.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAzureClients.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAzureClients with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAzureClients.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAzureClientsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkemulticloud.v1.IAzureClient[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAzureClients.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAzureClients.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAzureClusters', () => { + it('invokes listAzureClusters without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + ]; + client.innerApiCalls.listAzureClusters = stubSimpleCall(expectedResponse); + const [response] = await client.listAzureClusters(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAzureClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureClusters without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + ]; + client.innerApiCalls.listAzureClusters = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAzureClusters( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureCluster[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAzureClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureClusters with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAzureClusters = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAzureClusters(request), expectedError); + const actualRequest = (client.innerApiCalls.listAzureClusters as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureClusters as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureClustersStream without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + ]; + client.descriptors.page.listAzureClusters.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAzureClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AzureCluster[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureCluster) => { + 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.listAzureClusters.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAzureClusters, request)); + assert( + (client.descriptors.page.listAzureClusters.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAzureClustersStream with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAzureClusters.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAzureClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AzureCluster[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureCluster) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAzureClusters.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAzureClusters, request)); + assert( + (client.descriptors.page.listAzureClusters.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAzureClusters without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), + ]; + client.descriptors.page.listAzureClusters.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkemulticloud.v1.IAzureCluster[] = []; + const iterable = client.listAzureClustersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAzureClusters.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAzureClusters.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAzureClusters with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAzureClusters.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAzureClustersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkemulticloud.v1.IAzureCluster[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAzureClusters.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAzureClusters.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAzureNodePools', () => { + it('invokes listAzureNodePools without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + ]; + client.innerApiCalls.listAzureNodePools = stubSimpleCall(expectedResponse); + const [response] = await client.listAzureNodePools(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAzureNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureNodePools without error using callback', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + ]; + client.innerApiCalls.listAzureNodePools = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAzureNodePools( + request, + (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureNodePool[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAzureNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureNodePools with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAzureNodePools = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAzureNodePools(request), expectedError); + const actualRequest = (client.innerApiCalls.listAzureNodePools as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAzureNodePools as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAzureNodePoolsStream without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + ]; + client.descriptors.page.listAzureNodePools.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAzureNodePoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AzureNodePool[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureNodePool) => { + 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.listAzureNodePools.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAzureNodePools, request)); + assert( + (client.descriptors.page.listAzureNodePools.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAzureNodePoolsStream with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAzureNodePools.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAzureNodePoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AzureNodePool[] = []; + stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureNodePool) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAzureNodePools.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAzureNodePools, request)); + assert( + (client.descriptors.page.listAzureNodePools.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAzureNodePools without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), + ]; + client.descriptors.page.listAzureNodePools.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkemulticloud.v1.IAzureNodePool[] = []; + const iterable = client.listAzureNodePoolsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAzureNodePools.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAzureNodePools.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAzureNodePools with error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAzureNodePools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAzureNodePoolsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkemulticloud.v1.IAzureNodePool[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAzureNodePools.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAzureNodePools.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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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('attachedCluster', () => { + const fakePath = "/rendered/path/attachedCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + attached_cluster: "attachedClusterValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.attachedClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('attachedClusterPath', () => { + const result = client.attachedClusterPath("projectValue", "locationValue", "attachedClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAttachedClusterName', () => { + const result = client.matchProjectFromAttachedClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAttachedClusterName', () => { + const result = client.matchLocationFromAttachedClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAttachedClusterFromAttachedClusterName', () => { + const result = client.matchAttachedClusterFromAttachedClusterName(fakePath); + assert.strictEqual(result, "attachedClusterValue"); + assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('attachedServerConfig', () => { + const fakePath = "/rendered/path/attachedServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.attachedServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('attachedServerConfigPath', () => { + const result = client.attachedServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.attachedServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAttachedServerConfigName', () => { + const result = client.matchProjectFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAttachedServerConfigName', () => { + const result = client.matchLocationFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsCluster', () => { + const fakePath = "/rendered/path/awsCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aws_cluster: "awsClusterValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsClusterPath', () => { + const result = client.awsClusterPath("projectValue", "locationValue", "awsClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsClusterName', () => { + const result = client.matchProjectFromAwsClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsClusterName', () => { + const result = client.matchLocationFromAwsClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsClusterFromAwsClusterName', () => { + const result = client.matchAwsClusterFromAwsClusterName(fakePath); + assert.strictEqual(result, "awsClusterValue"); + assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsNodePool', () => { + const fakePath = "/rendered/path/awsNodePool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + aws_cluster: "awsClusterValue", + aws_node_pool: "awsNodePoolValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsNodePoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsNodePoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsNodePoolPath', () => { + const result = client.awsNodePoolPath("projectValue", "locationValue", "awsClusterValue", "awsNodePoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsNodePoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsNodePoolName', () => { + const result = client.matchProjectFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsNodePoolName', () => { + const result = client.matchLocationFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsClusterFromAwsNodePoolName', () => { + const result = client.matchAwsClusterFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "awsClusterValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAwsNodePoolFromAwsNodePoolName', () => { + const result = client.matchAwsNodePoolFromAwsNodePoolName(fakePath); + assert.strictEqual(result, "awsNodePoolValue"); + assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('awsServerConfig', () => { + const fakePath = "/rendered/path/awsServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.awsServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('awsServerConfigPath', () => { + const result = client.awsServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.awsServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAwsServerConfigName', () => { + const result = client.matchProjectFromAwsServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAwsServerConfigName', () => { + const result = client.matchLocationFromAwsServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureClient', () => { + const fakePath = "/rendered/path/azureClient"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_client: "azureClientValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureClientPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureClientPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureClientPath', () => { + const result = client.azureClientPath("projectValue", "locationValue", "azureClientValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureClientPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureClientName', () => { + const result = client.matchProjectFromAzureClientName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureClientName', () => { + const result = client.matchLocationFromAzureClientName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClientFromAzureClientName', () => { + const result = client.matchAzureClientFromAzureClientName(fakePath); + assert.strictEqual(result, "azureClientValue"); + assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureCluster', () => { + const fakePath = "/rendered/path/azureCluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_cluster: "azureClusterValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureClusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureClusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureClusterPath', () => { + const result = client.azureClusterPath("projectValue", "locationValue", "azureClusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureClusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureClusterName', () => { + const result = client.matchProjectFromAzureClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureClusterName', () => { + const result = client.matchLocationFromAzureClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClusterFromAzureClusterName', () => { + const result = client.matchAzureClusterFromAzureClusterName(fakePath); + assert.strictEqual(result, "azureClusterValue"); + assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureNodePool', () => { + const fakePath = "/rendered/path/azureNodePool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + azure_cluster: "azureClusterValue", + azure_node_pool: "azureNodePoolValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureNodePoolPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureNodePoolPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureNodePoolPath', () => { + const result = client.azureNodePoolPath("projectValue", "locationValue", "azureClusterValue", "azureNodePoolValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureNodePoolPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureNodePoolName', () => { + const result = client.matchProjectFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureNodePoolName', () => { + const result = client.matchLocationFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureClusterFromAzureNodePoolName', () => { + const result = client.matchAzureClusterFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "azureClusterValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAzureNodePoolFromAzureNodePoolName', () => { + const result = client.matchAzureNodePoolFromAzureNodePoolName(fakePath); + assert.strictEqual(result, "azureNodePoolValue"); + assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('azureServerConfig', () => { + const fakePath = "/rendered/path/azureServerConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureServerConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.azureServerConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('azureServerConfigPath', () => { + const result = client.azureServerConfigPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.azureServerConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAzureServerConfigName', () => { + const result = client.matchProjectFromAzureServerConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAzureServerConfigName', () => { + const result = client.matchLocationFromAzureServerConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + 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)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/tsconfig.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/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-gkemulticloud/v1/webpack.config.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/webpack.config.js new file mode 100644 index 00000000000..01b1c9f6e02 --- /dev/null +++ b/owl-bot-staging/google-cloud-gkemulticloud/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: 'AttachedClusters', + filename: './attached-clusters.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 781e712c71114491033e91907031c4775bcab757 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 20 Dec 2022 22:01:20 +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 --- .../v1/.eslintignore | 7 - .../v1/.eslintrc.json | 3 - .../google-cloud-gkemulticloud/v1/.gitignore | 14 - .../google-cloud-gkemulticloud/v1/.jsdoc.js | 55 - .../google-cloud-gkemulticloud/v1/.mocharc.js | 33 - .../v1/.prettierrc.js | 22 - .../google-cloud-gkemulticloud/v1/README.md | 1 - .../v1/linkinator.config.json | 16 - .../v1/package.json | 66 - .../gkemulticloud/v1/aws_resources.proto | 627 - .../cloud/gkemulticloud/v1/aws_service.proto | 605 - .../gkemulticloud/v1/azure_resources.proto | 688 - .../gkemulticloud/v1/azure_service.proto | 773 - .../gkemulticloud/v1/common_resources.proto | 174 - .../v1/aws_clusters.create_aws_cluster.js | 88 - .../v1/aws_clusters.create_aws_node_pool.js | 89 - .../v1/aws_clusters.delete_aws_cluster.js | 87 - .../v1/aws_clusters.delete_aws_node_pool.js | 88 - .../aws_clusters.generate_aws_access_token.js | 67 - .../v1/aws_clusters.get_aws_cluster.js | 67 - .../v1/aws_clusters.get_aws_node_pool.js | 67 - .../v1/aws_clusters.get_aws_server_config.js | 67 - .../v1/aws_clusters.list_aws_clusters.js | 82 - .../v1/aws_clusters.list_aws_node_pools.js | 83 - .../v1/aws_clusters.update_aws_cluster.js | 97 - .../v1/aws_clusters.update_aws_node_pool.js | 96 - .../v1/azure_clusters.create_azure_client.js | 88 - .../v1/azure_clusters.create_azure_cluster.js | 88 - .../azure_clusters.create_azure_node_pool.js | 88 - .../v1/azure_clusters.delete_azure_client.js | 80 - .../v1/azure_clusters.delete_azure_cluster.js | 87 - .../azure_clusters.delete_azure_node_pool.js | 89 - ...re_clusters.generate_azure_access_token.js | 67 - .../v1/azure_clusters.get_azure_client.js | 68 - .../v1/azure_clusters.get_azure_cluster.js | 67 - .../v1/azure_clusters.get_azure_node_pool.js | 67 - .../azure_clusters.get_azure_server_config.js | 67 - .../v1/azure_clusters.list_azure_clients.js | 82 - .../v1/azure_clusters.list_azure_clusters.js | 82 - .../azure_clusters.list_azure_node_pools.js | 83 - .../v1/azure_clusters.update_azure_cluster.js | 87 - .../azure_clusters.update_azure_node_pool.js | 79 - ...etadata.google.cloud.gkemulticloud.v1.json | 1711 -- .../v1/src/index.ts | 29 - .../v1/src/v1/attached_clusters_client.ts | 2024 -- .../v1/src/v1/aws_clusters_client.ts | 2571 -- .../v1/src/v1/aws_clusters_client_config.json | 98 - .../v1/src/v1/aws_clusters_proto_list.json | 9 - .../v1/src/v1/azure_clusters_client.ts | 3098 -- .../src/v1/azure_clusters_client_config.json | 118 - .../v1/src/v1/azure_clusters_proto_list.json | 9 - .../v1/src/v1/gapic_metadata.json | 435 - .../v1/src/v1/index.ts | 21 - .../system-test/fixtures/sample/src/index.js | 29 - .../system-test/fixtures/sample/src/index.ts | 44 - .../v1/system-test/install.ts | 49 - .../v1/test/gapic_attached_clusters_v1.ts | 2134 -- .../v1/test/gapic_aws_clusters_v1.ts | 2799 -- .../v1/test/gapic_azure_clusters_v1.ts | 3460 --- .../v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - packages/google-cloud-gkemulticloud/README.md | 8 + .../gkemulticloud/v1/attached_resources.proto | 0 .../gkemulticloud/v1/attached_service.proto | 0 .../gkemulticloud/v1/aws_resources.proto | 171 +- .../cloud/gkemulticloud/v1/aws_service.proto | 195 +- .../gkemulticloud/v1/azure_resources.proto | 174 +- .../gkemulticloud/v1/azure_service.proto | 274 +- .../gkemulticloud/v1/common_resources.proto | 39 +- .../protos/protos.d.ts | 5246 +++- .../protos/protos.js | 25280 ++++++++++------ .../protos/protos.json | 1004 +- .../samples/README.md | 144 + ...tached_clusters.create_attached_cluster.js | 0 ...tached_clusters.delete_attached_cluster.js | 0 ...erate_attached_cluster_install_manifest.js | 0 .../attached_clusters.get_attached_cluster.js | 0 ...hed_clusters.get_attached_server_config.js | 0 ...tached_clusters.import_attached_cluster.js | 0 ...ttached_clusters.list_attached_clusters.js | 0 ...tached_clusters.update_attached_cluster.js | 0 .../v1/aws_clusters.create_aws_cluster.js | 19 +- .../v1/aws_clusters.create_aws_node_pool.js | 17 +- .../v1/aws_clusters.delete_aws_cluster.js | 13 +- .../v1/aws_clusters.delete_aws_node_pool.js | 13 +- .../aws_clusters.generate_aws_access_token.js | 4 +- .../v1/aws_clusters.get_aws_cluster.js | 4 +- .../v1/aws_clusters.get_aws_node_pool.js | 4 +- .../v1/aws_clusters.get_aws_server_config.js | 4 +- .../v1/aws_clusters.list_aws_clusters.js | 7 +- .../v1/aws_clusters.list_aws_node_pools.js | 7 +- .../v1/aws_clusters.update_aws_cluster.js | 12 +- .../v1/aws_clusters.update_aws_node_pool.js | 10 +- .../v1/azure_clusters.create_azure_client.js | 19 +- .../v1/azure_clusters.create_azure_cluster.js | 19 +- .../azure_clusters.create_azure_node_pool.js | 17 +- .../v1/azure_clusters.delete_azure_client.js | 13 +- .../v1/azure_clusters.delete_azure_cluster.js | 13 +- .../azure_clusters.delete_azure_node_pool.js | 14 +- ...re_clusters.generate_azure_access_token.js | 4 +- .../v1/azure_clusters.get_azure_client.js | 7 +- .../v1/azure_clusters.get_azure_cluster.js | 4 +- .../v1/azure_clusters.get_azure_node_pool.js | 4 +- .../azure_clusters.get_azure_server_config.js | 4 +- .../v1/azure_clusters.list_azure_clients.js | 7 +- .../v1/azure_clusters.list_azure_clusters.js | 7 +- .../azure_clusters.list_azure_node_pools.js | 7 +- .../v1/azure_clusters.update_azure_cluster.js | 12 +- .../azure_clusters.update_azure_node_pool.js | 5 +- ...etadata.google.cloud.gkemulticloud.v1.json | 500 +- .../google-cloud-gkemulticloud/src/index.ts | 11 +- .../src/v1/attached_clusters_client.ts | 2436 ++ .../v1/attached_clusters_client_config.json | 0 .../src/v1/attached_clusters_proto_list.json | 0 .../src/v1/aws_clusters_client.ts | 454 +- .../src/v1/aws_clusters_proto_list.json | 2 + .../src/v1/azure_clusters_client.ts | 525 +- .../src/v1/azure_clusters_proto_list.json | 2 + .../src/v1/gapic_metadata.json | 98 + .../src/v1/index.ts | 1 + .../system-test/fixtures/sample/src/index.js | 1 + .../system-test/fixtures/sample/src/index.ts | 7 + .../test/gapic_attached_clusters_v1.ts | 2769 ++ .../test/gapic_aws_clusters_v1.ts | 433 + .../test/gapic_azure_clusters_v1.ts | 433 + .../webpack.config.js | 4 +- 126 files changed, 29255 insertions(+), 35278 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/linkinator.config.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_resources.proto delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_service.proto delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_resources.proto delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_service.proto delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/common_resources.proto delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_cluster.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_node_pool.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_cluster.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_node_pool.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.generate_aws_access_token.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_cluster.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_node_pool.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_server_config.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_clusters.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_node_pools.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_cluster.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_node_pool.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_client.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_cluster.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_node_pool.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_client.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_cluster.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_node_pool.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.generate_azure_access_token.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_client.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_cluster.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_node_pool.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_server_config.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clients.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clusters.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_node_pools.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_cluster.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_node_pool.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client_config.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client_config.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_attached_clusters_v1.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_aws_clusters_v1.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_azure_clusters_v1.ts delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-gkemulticloud/v1/webpack.config.js rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/protos/google/cloud/gkemulticloud/v1/attached_resources.proto (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/protos/google/cloud/gkemulticloud/v1/attached_service.proto (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/samples/generated/v1/attached_clusters.create_attached_cluster.js (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/samples/generated/v1/attached_clusters.delete_attached_cluster.js (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/samples/generated/v1/attached_clusters.get_attached_cluster.js (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/samples/generated/v1/attached_clusters.get_attached_server_config.js (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/samples/generated/v1/attached_clusters.import_attached_cluster.js (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/samples/generated/v1/attached_clusters.list_attached_clusters.js (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/samples/generated/v1/attached_clusters.update_attached_cluster.js (100%) create mode 100644 packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client.ts rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/src/v1/attached_clusters_client_config.json (100%) rename {owl-bot-staging/google-cloud-gkemulticloud/v1 => packages/google-cloud-gkemulticloud}/src/v1/attached_clusters_proto_list.json (100%) create mode 100644 packages/google-cloud-gkemulticloud/test/gapic_attached_clusters_v1.ts diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintignore b/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/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-gkemulticloud/v1/.eslintrc.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/.gitignore b/owl-bot-staging/google-cloud-gkemulticloud/v1/.gitignore deleted file mode 100644 index 5d32b23782f..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/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-gkemulticloud/v1/.jsdoc.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/.jsdoc.js deleted file mode 100644 index 57ece68c9c0..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2022 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/gkemulticloud', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/.mocharc.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/.mocharc.js deleted file mode 100644 index 481c522b00f..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -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-gkemulticloud/v1/.prettierrc.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/.prettierrc.js deleted file mode 100644 index 494e147865d..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/README.md b/owl-bot-staging/google-cloud-gkemulticloud/v1/README.md deleted file mode 100644 index 2e8a88145db..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Gkemulticloud: Nodejs Client diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/linkinator.config.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/linkinator.config.json deleted file mode 100644 index befd23c8633..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/linkinator.config.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "recurse": true, - "skip": [ - "https://codecov.io/gh/googleapis/", - "www.googleapis.com", - "img.shields.io", - "https://console.cloud.google.com/cloudshell", - "https://support.google.com" - ], - "silent": true, - "concurrency": 5, - "retry": true, - "retryErrors": true, - "retryErrorsCount": 5, - "retryErrorsJitter": 3000 -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/package.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/package.json deleted file mode 100644 index d49079a276b..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "@google-cloud/gkemulticloud", - "version": "0.1.0", - "description": "Gkemulticloud client for Node.js", - "repository": "googleapis/nodejs-gkemulticloud", - "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 gkemulticloud", - "gkemulticloud", - "attached clusters", - "aws clusters", - "azure clusters" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "predocs-test": "npm run docs", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^3.5.2" - }, - "devDependencies": { - "@types/mocha": "^9.1.1", - "@types/node": "^16.11.62", - "@types/sinon": "^10.0.13", - "c8": "^7.12.0", - "gts": "^3.1.1", - "jsdoc": "^3.6.11", - "jsdoc-fresh": "^2.0.1", - "jsdoc-region-tag": "^2.0.1", - "linkinator": "^4.0.3", - "mocha": "^10.0.0", - "null-loader": "^4.0.1", - "pack-n-play": "^1.0.0-2", - "sinon": "^14.0.0", - "ts-loader": "^8.4.0", - "typescript": "^4.8.3", - "webpack": "^4.46.0", - "webpack-cli": "^4.10.0" - }, - "engines": { - "node": ">=v12" - } -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_resources.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_resources.proto deleted file mode 100644 index dc7e918209e..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_resources.proto +++ /dev/null @@ -1,627 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.gkemulticloud.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/gkemulticloud/v1/common_resources.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; -option java_multiple_files = true; -option java_outer_classname = "AwsResourcesProto"; -option java_package = "com.google.cloud.gkemulticloud.v1"; -option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; -option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; - -// An Anthos cluster running on AWS. -message AwsCluster { - option (google.api.resource) = { - type: "gkemulticloud.googleapis.com/AwsCluster" - pattern: "projects/{project}/locations/{location}/awsClusters/{aws_cluster}" - }; - - // The lifecycle state of the cluster. - enum State { - // Not set. - STATE_UNSPECIFIED = 0; - - // The PROVISIONING state indicates the cluster is being created. - PROVISIONING = 1; - - // The RUNNING state indicates the cluster has been created and is fully - // usable. - RUNNING = 2; - - // The RECONCILING state indicates that some work is actively being done on - // the cluster, such as upgrading the control plane replicas. - RECONCILING = 3; - - // The STOPPING state indicates the cluster is being deleted. - STOPPING = 4; - - // The ERROR state indicates the cluster is in a broken unrecoverable - // state. - ERROR = 5; - - // The DEGRADED state indicates the cluster requires user action to - // restore full functionality. - DEGRADED = 6; - } - - // The name of this resource. - // - // Cluster names are formatted as - // `projects//locations//awsClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string name = 1; - - // Optional. A human readable description of this cluster. - // Cannot be longer than 255 UTF-8 encoded bytes. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Cluster-wide networking configuration. - AwsClusterNetworking networking = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The AWS region where the cluster runs. - // - // Each Google Cloud region supports a subset of nearby AWS regions. - // You can call - // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig] - // to list all supported AWS regions within a given Google Cloud region. - string aws_region = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. Configuration related to the cluster control plane. - AwsControlPlane control_plane = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. Configuration related to the cluster RBAC settings. - AwsAuthorization authorization = 15 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The current state of the cluster. - State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The endpoint of the cluster's API server. - string endpoint = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A globally unique identifier for the cluster. - string uid = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If set, there are currently changes in flight to the cluster. - bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this cluster was created. - google.protobuf.Timestamp create_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this cluster was last updated. - google.protobuf.Timestamp update_time = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Allows clients to perform consistent read-modify-writes - // through optimistic concurrency control. - // - // Can be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 13; - - // Optional. Annotations on the cluster. - // - // This field has the same restrictions as Kubernetes annotations. - // The total size of all keys and values combined is limited to 256k. - // Key can have 2 segments: prefix (optional) and name (required), - // separated by a slash (/). - // Prefix must be a DNS subdomain. - // Name must be 63 characters or less, begin and end with alphanumerics, - // with dashes (-), underscores (_), dots (.), and alphanumerics between. - map annotations = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Workload Identity settings. - WorkloadIdentityConfig workload_identity_config = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. PEM encoded x509 certificate of the cluster root of trust. - string cluster_ca_certificate = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Fleet configuration. - Fleet fleet = 18 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Logging configuration for this cluster. - LoggingConfig logging_config = 19 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. A set of errors found in the cluster. - repeated AwsClusterError errors = 20 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Monitoring configuration for this cluster. - MonitoringConfig monitoring_config = 21 - [(google.api.field_behavior) = OPTIONAL]; -} - -// ControlPlane defines common parameters between control plane nodes. -message AwsControlPlane { - // Required. The Kubernetes version to run on control plane replicas - // (e.g. `1.19.10-gke.1000`). - // - // You can list all supported versions on a given Google Cloud region by - // calling - // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - string version = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The AWS instance type. - // - // When unspecified, it uses a default based on the cluster's version. - string instance_type = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SSH configuration for how to access the underlying control plane - // machines. - AwsSshConfig ssh_config = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The list of subnets where control plane replicas will run. - // A replica will be provisioned on each subnet and up to three values - // can be provided. - // Each subnet must be in a different AWS Availability Zone (AZ). - repeated string subnet_ids = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The IDs of additional security groups to add to control plane - // replicas. The Anthos Multi-Cloud API will automatically create and manage - // security groups with the minimum rules needed for a functioning cluster. - repeated string security_group_ids = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The name or ARN of the AWS IAM instance profile to assign to each - // control plane replica. - string iam_instance_profile = 7 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Configuration related to the root volume provisioned for each - // control plane replica. - // - // Volumes will be provisioned in the availability zone associated - // with the corresponding subnet. - // - // When unspecified, it defaults to 32 GiB with the GP2 volume type. - AwsVolumeTemplate root_volume = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration related to the main volume provisioned for each - // control plane replica. - // The main volume is in charge of storing all of the cluster's etcd state. - // - // Volumes will be provisioned in the availability zone associated - // with the corresponding subnet. - // - // When unspecified, it defaults to 8 GiB with the GP2 volume type. - AwsVolumeTemplate main_volume = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - AwsDatabaseEncryption database_encryption = 10 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. A set of AWS resource tags to propagate to all underlying managed - // AWS resources. - // - // Specify at most 50 pairs containing alphanumerics, spaces, and symbols - // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - // 255 Unicode characters. - map tags = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Authentication configuration for management of AWS resources. - AwsServicesAuthentication aws_services_authentication = 12 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Proxy configuration for outbound HTTP(S) traffic. - AwsProxyConfig proxy_config = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Config encryption for user data. - AwsConfigEncryption config_encryption = 17 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The placement to use on control plane instances. - // When unspecified, the VPC's default tenancy will be used. - AwsInstancePlacement instance_placement = 18 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Authentication configuration for the management of AWS resources. -message AwsServicesAuthentication { - // Required. The Amazon Resource Name (ARN) of the role that the Anthos - // Multi-Cloud API will assume when managing AWS resources on your account. - string role_arn = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An identifier for the assumed role session. - // - // When unspecified, it defaults to `multicloud-service-agent`. - string role_session_name = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration related to the cluster RBAC settings. -message AwsAuthorization { - // Required. Users that can perform operations as a cluster admin. A managed - // ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - // to the users. Up to ten admin users can be provided. - // - // For more info on RBAC, see - // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - repeated AwsClusterUser admin_users = 1 - [(google.api.field_behavior) = REQUIRED]; -} - -// Identities of a user-type subject for AWS clusters. -message AwsClusterUser { - // Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - string username = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Configuration related to application-layer secrets encryption. -message AwsDatabaseEncryption { - // Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - string kms_key_arn = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Configuration template for AWS EBS volumes. -message AwsVolumeTemplate { - // Types of supported EBS volumes. We currently only support GP2 or GP3 - // volumes. - // See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html - // for more information. - enum VolumeType { - // Not set. - VOLUME_TYPE_UNSPECIFIED = 0; - - // GP2 (General Purpose SSD volume type). - GP2 = 1; - - // GP3 (General Purpose SSD volume type). - GP3 = 2; - } - - // Optional. The size of the volume, in GiBs. - // - // When unspecified, a default value is provided. See the specific reference - // in the parent resource. - int32 size_gib = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Type of the EBS volume. - // - // When unspecified, it defaults to GP2 volume. - VolumeType volume_type = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of I/O operations per second (IOPS) to provision for - // GP3 volume. - int32 iops = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) - // used to encrypt AWS EBS volumes. - // - // If not specified, the default Amazon managed key associated to - // the AWS region where this cluster runs will be used. - string kms_key_arn = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// ClusterNetworking defines cluster-wide networking configuration. -// -// Anthos clusters on AWS run on a single VPC. This includes control -// plane replicas and node pool nodes. -message AwsClusterNetworking { - // Required. The VPC associated with the cluster. All component clusters - // (i.e. control plane and node pools) run on a single VPC. - // - // This field cannot be changed after creation. - string vpc_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. All pods in the cluster are assigned an IPv4 address from these - // ranges. Only a single range is supported. This field cannot be changed - // after creation. - repeated string pod_address_cidr_blocks = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Required. All services in the cluster are assigned an IPv4 address from - // these ranges. Only a single range is supported. This field cannot be - // changed after creation. - repeated string service_address_cidr_blocks = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// An Anthos node pool running on AWS. -message AwsNodePool { - option (google.api.resource) = { - type: "gkemulticloud.googleapis.com/AwsNodePool" - pattern: "projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}" - }; - - // The lifecycle state of the node pool. - enum State { - // Not set. - STATE_UNSPECIFIED = 0; - - // The PROVISIONING state indicates the node pool is being created. - PROVISIONING = 1; - - // The RUNNING state indicates the node pool has been created - // and is fully usable. - RUNNING = 2; - - // The RECONCILING state indicates that the node pool is being reconciled. - RECONCILING = 3; - - // The STOPPING state indicates the node pool is being deleted. - STOPPING = 4; - - // The ERROR state indicates the node pool is in a broken unrecoverable - // state. - ERROR = 5; - - // The DEGRADED state indicates the node pool requires user action to - // restore full functionality. - DEGRADED = 6; - } - - // The name of this resource. - // - // Node pool names are formatted as - // `projects//locations//awsClusters//awsNodePools/`. - // - // For more details on Google Cloud resource names, - // see [Resource Names](https://cloud.google.com/apis/design/resource_names) - string name = 1; - - // Required. The Kubernetes version to run on this node pool (e.g. - // `1.19.10-gke.1000`). - // - // You can list all supported versions on a given Google Cloud region by - // calling - // [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig]. - string version = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The configuration of the node pool. - AwsNodeConfig config = 28 [(google.api.field_behavior) = REQUIRED]; - - // Required. Autoscaler configuration for this node pool. - AwsNodePoolAutoscaling autoscaling = 25 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The subnet where the node pool node run. - string subnet_id = 6 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The lifecycle state of the node pool. - State state = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A globally unique identifier for the node pool. - string uid = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If set, there are currently changes in flight to the node - // pool. - bool reconciling = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this node pool was created. - google.protobuf.Timestamp create_time = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this node pool was last updated. - google.protobuf.Timestamp update_time = 20 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Allows clients to perform consistent read-modify-writes - // through optimistic concurrency control. - // - // Can be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 21; - - // Optional. Annotations on the node pool. - // - // This field has the same restrictions as Kubernetes annotations. - // The total size of all keys and values combined is limited to 256k. - // Key can have 2 segments: prefix (optional) and name (required), - // separated by a slash (/). - // Prefix must be a DNS subdomain. - // Name must be 63 characters or less, begin and end with alphanumerics, - // with dashes (-), underscores (_), dots (.), and alphanumerics between. - map annotations = 22 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The constraint on the maximum number of pods that can be run - // simultaneously on a node in the node pool. - MaxPodsConstraint max_pods_constraint = 27 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. A set of errors found in the node pool. - repeated AwsNodePoolError errors = 29 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Parameters that describe the nodes in a cluster. -message AwsNodeConfig { - // Optional. The AWS instance type. - // - // When unspecified, it uses a default based on the node pool's version. - string instance_type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Template for the root volume provisioned for node pool nodes. - // Volumes will be provisioned in the availability zone assigned - // to the node pool subnet. - // - // When unspecified, it defaults to 32 GiB with the GP2 volume type. - AwsVolumeTemplate root_volume = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The initial taints assigned to nodes of this node pool. - repeated NodeTaint taints = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The initial labels assigned to nodes of this node pool. An object - // containing a list of "key": value pairs. Example: { "name": "wrench", - // "mass": "1.3kg", "count": "3" }. - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Key/value metadata to assign to each underlying AWS resource. - // Specify at most 50 pairs containing alphanumerics, spaces, and symbols - // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - // 255 Unicode characters. - map tags = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The name or ARN of the AWS IAM role assigned to nodes in the - // pool. - string iam_instance_profile = 6 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The OS image type to use on node pool instances. - // Can have a value of `ubuntu`, or `windows` if the cluster enables - // the Windows node pool preview feature. - // - // When unspecified, it defaults to `ubuntu`. - string image_type = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The SSH configuration. - AwsSshConfig ssh_config = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The IDs of additional security groups to add to nodes in this - // pool. The manager will automatically create security groups with minimum - // rules needed for a functioning cluster. - repeated string security_group_ids = 10 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Proxy configuration for outbound HTTP(S) traffic. - AwsProxyConfig proxy_config = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Config encryption for user data. - AwsConfigEncryption config_encryption = 13 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. Placement related info for this node. - // When unspecified, the VPC's default tenancy will be used. - AwsInstancePlacement instance_placement = 14 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration related to CloudWatch metrics collection on the - // Auto Scaling group of the node pool. - // - // When unspecified, metrics collection is disabled. - AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 - [(google.api.field_behavior) = OPTIONAL]; -} - -// AwsNodePoolAutoscaling contains information required by cluster autoscaler -// to adjust the size of the node pool to the current cluster usage. -message AwsNodePoolAutoscaling { - // Required. Minimum number of nodes in the node pool. Must be greater than or - // equal to 1 and less than or equal to max_node_count. - int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Maximum number of nodes in the node pool. Must be greater than or - // equal to min_node_count and less than or equal to 50. - int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// AwsServerConfig is the configuration of GKE cluster on AWS. -message AwsServerConfig { - option (google.api.resource) = { - type: "gkemulticloud.googleapis.com/AwsServerConfig" - pattern: "projects/{project}/locations/{location}/awsServerConfig" - }; - - // The resource name of the config. - string name = 1; - - // List of valid Kubernetes versions. - repeated AwsK8sVersionInfo valid_versions = 2; - - // The list of supported AWS regions. - repeated string supported_aws_regions = 3; -} - -// Kubernetes version information of GKE cluster on AWS. -message AwsK8sVersionInfo { - // Kubernetes version name. - string version = 1; -} - -// SSH configuration for AWS resources. -message AwsSshConfig { - // Required. The name of the EC2 key pair used to login into cluster machines. - string ec2_key_pair = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Details of a proxy config stored in AWS Secret Manager. -message AwsProxyConfig { - // The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy - // configuration. - // - // The secret must be a JSON encoded proxy configuration - // as described in - // https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file - string secret_arn = 1; - - // The version string of the AWS Secret Manager secret that contains the - // HTTP(S) proxy configuration. - string secret_version = 2; -} - -// Config encryption for user data. -message AwsConfigEncryption { - // Required. The ARN of the AWS KMS key used to encrypt user data. - string kms_key_arn = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Details of placement information for an instance. -// Limitations for using the `host` tenancy: -// -// * T3 instances that use the unlimited CPU credit option don't support host -// tenancy. -message AwsInstancePlacement { - // Tenancy defines how EC2 instances are distributed across physical hardware. - enum Tenancy { - // Not set. - TENANCY_UNSPECIFIED = 0; - - // Use default VPC tenancy. - DEFAULT = 1; - - // Run a dedicated instance. - DEDICATED = 2; - - // Launch this instance to a dedicated host. - HOST = 3; - } - - // Required. The tenancy for instance. - Tenancy tenancy = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Configuration related to CloudWatch metrics collection in an AWS -// Auto Scaling group. -message AwsAutoscalingGroupMetricsCollection { - // Required. The frequency at which EC2 Auto Scaling sends aggregated data to - // AWS CloudWatch. The only valid value is "1Minute". - string granularity = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The metrics to enable. For a list of valid metrics, see - // https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. - // If you specify Granularity and don't specify any metrics, all metrics are - // enabled. - repeated string metrics = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// AwsClusterError describes errors found on AWS clusters. -message AwsClusterError { - // Human-friendly description of the error. - string message = 1; -} - -// AwsNodePoolError describes errors found on AWS node pools. -message AwsNodePoolError { - // Human-friendly description of the error. - string message = 1; -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_service.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_service.proto deleted file mode 100644 index cb1f3a41db3..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/aws_service.proto +++ /dev/null @@ -1,605 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.gkemulticloud.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/gkemulticloud/v1/aws_resources.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; -option java_multiple_files = true; -option java_outer_classname = "AwsServiceProto"; -option java_package = "com.google.cloud.gkemulticloud.v1"; -option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; -option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; - -// The AwsClusters API provides a single centrally managed service -// to create and manage Anthos clusters that run on AWS infrastructure. -service AwsClusters { - option (google.api.default_host) = "gkemulticloud.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - // resource on a given GCP project and region. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc CreateAwsCluster(CreateAwsClusterRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/awsClusters" - body: "aws_cluster" - }; - option (google.api.method_signature) = "parent,aws_cluster,aws_cluster_id"; - option (google.longrunning.operation_info) = { - response_type: "AwsCluster" - metadata_type: "OperationMetadata" - }; - } - - // Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - rpc UpdateAwsCluster(UpdateAwsClusterRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}" - body: "aws_cluster" - }; - option (google.api.method_signature) = "aws_cluster,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "AwsCluster" - metadata_type: "OperationMetadata" - }; - } - - // Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - // resource. - rpc GetAwsCluster(GetAwsClusterRequest) returns (AwsCluster) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/awsClusters/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - // on a given Google Cloud project and region. - rpc ListAwsClusters(ListAwsClustersRequest) - returns (ListAwsClustersResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/awsClusters" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - // resource. - // - // Fails if the cluster has one or more associated - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc DeleteAwsCluster(DeleteAwsClusterRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/awsClusters/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Generates a short-lived access token to authenticate to a given - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. - rpc GenerateAwsAccessToken(GenerateAwsAccessTokenRequest) - returns (GenerateAwsAccessTokenResponse) { - option (google.api.http) = { - get: "/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessToken" - }; - } - - // Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], - // attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc CreateAwsNodePool(CreateAwsNodePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools" - body: "aws_node_pool" - }; - option (google.api.method_signature) = - "parent,aws_node_pool,aws_node_pool_id"; - option (google.longrunning.operation_info) = { - response_type: "AwsNodePool" - metadata_type: "OperationMetadata" - }; - } - - // Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - rpc UpdateAwsNodePool(UpdateAwsNodePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" - body: "aws_node_pool" - }; - option (google.api.method_signature) = "aws_node_pool,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "AwsNodePool" - metadata_type: "OperationMetadata" - }; - } - - // Describes a specific - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. - rpc GetAwsNodePool(GetAwsNodePoolRequest) returns (AwsNodePool) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - // resources on a given - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - rpc ListAwsNodePools(ListAwsNodePoolsRequest) - returns (ListAwsNodePoolsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - // resource. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc DeleteAwsNodePool(DeleteAwsNodePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Returns information, such as supported AWS regions and Kubernetes - // versions, on a given Google Cloud location. - rpc GetAwsServerConfig(GetAwsServerConfigRequest) returns (AwsServerConfig) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/awsServerConfig}" - }; - option (google.api.method_signature) = "name"; - } -} - -// Request message for `AwsClusters.CreateAwsCluster` method. -message CreateAwsClusterRequest { - // Required. The parent location where this - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be - // created. - // - // Location names are formatted as `projects//locations/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AwsCluster" - } - ]; - - // Required. The specification of the - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. - AwsCluster aws_cluster = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A client provided ID the resource. Must be unique within the - // parent resource. - // - // The provided ID will be part of the - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name - // formatted as - // `projects//locations//awsClusters/`. - // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - string aws_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but do not actually create the cluster. - bool validate_only = 4; -} - -// Request message for `AwsClusters.UpdateAwsCluster` method. -message UpdateAwsClusterRequest { - // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - // resource to update. - AwsCluster aws_cluster = 1 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but do not actually update the cluster. - bool validate_only = 2; - - // Required. Mask of fields to update. At least one path must be supplied in - // this field. The elements of the repeated paths field can only include these - // fields from [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]: - // - // * `description`. - // * `annotations`. - // * `control_plane.version`. - // * `authorization.admin_users`. - // * `control_plane.aws_services_authentication.role_arn`. - // * `control_plane.aws_services_authentication.role_session_name`. - // * `control_plane.config_encryption.kms_key_arn`. - // * `control_plane.instance_type`. - // * `control_plane.security_group_ids`. - // * `control_plane.proxy_config`. - // * `control_plane.proxy_config.secret_arn`. - // * `control_plane.proxy_config.secret_version`. - // * `control_plane.root_volume.size_gib`. - // * `control_plane.root_volume.volume_type`. - // * `control_plane.root_volume.iops`. - // * `control_plane.root_volume.kms_key_arn`. - // * `control_plane.ssh_config`. - // * `control_plane.ssh_config.ec2_key_pair`. - // * `control_plane.instance_placement.tenancy`. - // * `control_plane.iam_instance_profile`. - // * `logging_config.component_config.enable_components`. - // * `control_plane.tags`. - // * `monitoring_config.managed_prometheus_config.enabled`. - google.protobuf.FieldMask update_mask = 4 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `AwsClusters.GetAwsCluster` method. -message GetAwsClusterRequest { - // Required. The name of the - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - // describe. - // - // `AwsCluster` names are formatted as - // `projects//locations//awsClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AwsCluster" - } - ]; -} - -// Request message for `AwsClusters.ListAwsClusters` method. -message ListAwsClustersRequest { - // Required. The parent location which owns this collection of - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources. - // - // Location names are formatted as `projects//locations/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AwsCluster" - } - ]; - - // The maximum number of items to return. - // - // If not specified, a default value of 50 will be used by the service. - // Regardless of the pageSize value, the response can include a partial list - // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] - // to determine if there are more instances left to be queried. - int32 page_size = 2; - - // The `nextPageToken` value returned from a previous - // [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] - // request, if any. - string page_token = 3; -} - -// Response message for `AwsClusters.ListAwsClusters` method. -message ListAwsClustersResponse { - // A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources - // in the specified GCP project and region region. - repeated AwsCluster aws_clusters = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for `AwsClusters.DeleteAwsCluster` method. -message DeleteAwsClusterRequest { - // Required. The resource name the - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. - // - // `AwsCluster` names are formatted as - // `projects//locations//awsClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AwsCluster" - } - ]; - - // If set, only validate the request, but do not actually delete the resource. - bool validate_only = 2; - - // If set to true, and the - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not - // found, the request will succeed but no action will be taken on the server - // and a completed [Operation][google.longrunning.Operation] will be returned. - // - // Useful for idempotent deletion. - bool allow_missing = 3; - - // The current etag of the - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - // - // Allows clients to perform deletions through optimistic concurrency control. - // - // If the provided etag does not match the current etag of the cluster, - // the request will fail and an ABORTED error will be returned. - string etag = 4; -} - -// Response message for `AwsClusters.CreateAwsNodePool` method. -message CreateAwsNodePoolRequest { - // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - // resource where this node pool will be created. - // - // `AwsCluster` names are formatted as - // `projects//locations//awsClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AwsNodePool" - } - ]; - - // Required. The specification of the - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. - AwsNodePool aws_node_pool = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A client provided ID the resource. Must be unique within the - // parent resource. - // - // The provided ID will be part of the - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name - // formatted as - // `projects//locations//awsClusters//awsNodePools/`. - // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - string aws_node_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but do not actually create the node - // pool. - bool validate_only = 4; -} - -// Request message for `AwsClusters.UpdateAwsNodePool` method. -message UpdateAwsNodePoolRequest { - // Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - // resource to update. - AwsNodePool aws_node_pool = 1 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but don't actually update the node pool. - bool validate_only = 2; - - // Required. Mask of fields to update. At least one path must be supplied in - // this field. The elements of the repeated paths field can only include these - // fields from [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]: - // - // * `annotations`. - // * `version`. - // * `autoscaling.min_node_count`. - // * `autoscaling.max_node_count`. - // * `config.config_encryption.kms_key_arn`. - // * `config.security_group_ids`. - // * `config.root_volume.iops`. - // * `config.root_volume.kms_key_arn`. - // * `config.root_volume.volume_type`. - // * `config.root_volume.size_gib`. - // * `config.proxy_config`. - // * `config.proxy_config.secret_arn`. - // * `config.proxy_config.secret_version`. - // * `config.ssh_config`. - // * `config.ssh_config.ec2_key_pair`. - // * `config.instance_placement.tenancy`. - // * `config.iam_instance_profile`. - // * `config.labels`. - // * `config.tags`. - // * `config.autoscaling_metrics_collection`. - // * `config.autoscaling_metrics_collection.granularity`. - // * `config.autoscaling_metrics_collection.metrics`. - google.protobuf.FieldMask update_mask = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `AwsClusters.GetAwsNodePool` method. -message GetAwsNodePoolRequest { - // Required. The name of the - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to - // describe. - // - // `AwsNodePool` names are formatted as - // `projects//locations//awsClusters//awsNodePools/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AwsNodePool" - } - ]; -} - -// Request message for `AwsClusters.ListAwsNodePools` method. -message ListAwsNodePoolsRequest { - // Required. The parent `AwsCluster` which owns this collection of - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. - // - // `AwsCluster` names are formatted as - // `projects//locations//awsClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AwsNodePool" - } - ]; - - // The maximum number of items to return. - // - // If not specified, a default value of 50 will be used by the service. - // Regardless of the pageSize value, the response can include a partial list - // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] - // to determine if there are more instances left to be queried. - int32 page_size = 2; - - // The `nextPageToken` value returned from a previous - // [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] - // request, if any. - string page_token = 3; -} - -// Response message for `AwsClusters.ListAwsNodePools` method. -message ListAwsNodePoolsResponse { - // A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - // resources in the specified `AwsCluster`. - repeated AwsNodePool aws_node_pools = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for `AwsClusters.DeleteAwsNodePool` method. -message DeleteAwsNodePoolRequest { - // Required. The resource name the - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. - // - // `AwsNodePool` names are formatted as - // `projects//locations//awsClusters//awsNodePools/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AwsNodePool" - } - ]; - - // If set, only validate the request, but do not actually delete the node - // pool. - bool validate_only = 2; - - // If set to true, and the - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not - // found, the request will succeed but no action will be taken on the server - // and a completed [Operation][google.longrunning.Operation] will be returned. - // - // Useful for idempotent deletion. - bool allow_missing = 3; - - // The current ETag of the - // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - // - // Allows clients to perform deletions through optimistic concurrency control. - // - // If the provided ETag does not match the current etag of the node pool, - // the request will fail and an ABORTED error will be returned. - string etag = 4; -} - -// GetAwsServerConfigRequest gets the server config of GKE cluster on AWS. -message GetAwsServerConfigRequest { - // Required. The name of the - // [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource - // to describe. - // - // `AwsServerConfig` names are formatted as - // `projects//locations//awsServerConfig`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AwsServerConfig" - } - ]; -} - -// Request message for `AwsClusters.GenerateAwsAccessToken` method. -message GenerateAwsAccessTokenRequest { - // Required. The name of the - // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to - // authenticate to. - // - // `AwsCluster` names are formatted as - // `projects//locations//awsClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string aws_cluster = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AwsCluster" - } - ]; -} - -// Response message for `AwsClusters.GenerateAwsAccessToken` method. -message GenerateAwsAccessTokenResponse { - // Output only. Access token to authenticate to k8s api-server. - string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Timestamp at which the token will expire. - google.protobuf.Timestamp expiration_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_resources.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_resources.proto deleted file mode 100644 index b6750d76423..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_resources.proto +++ /dev/null @@ -1,688 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.gkemulticloud.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/gkemulticloud/v1/common_resources.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; -option java_multiple_files = true; -option java_outer_classname = "AzureResourcesProto"; -option java_package = "com.google.cloud.gkemulticloud.v1"; -option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; -option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; - -// An Anthos cluster running on Azure. -message AzureCluster { - option (google.api.resource) = { - type: "gkemulticloud.googleapis.com/AzureCluster" - pattern: "projects/{project}/locations/{location}/azureClusters/{azure_cluster}" - }; - - // The lifecycle state of the cluster. - enum State { - // Not set. - STATE_UNSPECIFIED = 0; - - // The PROVISIONING state indicates the cluster is being created. - PROVISIONING = 1; - - // The RUNNING state indicates the cluster has been created and is fully - // usable. - RUNNING = 2; - - // The RECONCILING state indicates that some work is actively being done on - // the cluster, such as upgrading the control plane replicas. - RECONCILING = 3; - - // The STOPPING state indicates the cluster is being deleted. - STOPPING = 4; - - // The ERROR state indicates the cluster is in a broken unrecoverable - // state. - ERROR = 5; - - // The DEGRADED state indicates the cluster requires user action to - // restore full functionality. - DEGRADED = 6; - } - - // The name of this resource. - // - // Cluster names are formatted as - // `projects//locations//azureClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string name = 1; - - // Optional. A human readable description of this cluster. - // Cannot be longer than 255 UTF-8 encoded bytes. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The Azure region where the cluster runs. - // - // Each Google Cloud region supports a subset of nearby Azure regions. - // You can call - // [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig] - // to list all supported Azure regions within a given Google Cloud region. - string azure_region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ARM ID of the resource group where the cluster resources are - // deployed. For example: - // `/subscriptions//resourceGroups/` - string resource_group_id = 17 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains - // authentication configuration for how the Anthos Multi-Cloud API connects to - // Azure APIs. - // - // The `AzureClient` resource must reside on the same GCP project and region - // as the `AzureCluster`. - // - // `AzureClient` names are formatted as - // `projects//locations//azureClients/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string azure_client = 16 [(google.api.field_behavior) = REQUIRED]; - - // Required. Cluster-wide networking configuration. - AzureClusterNetworking networking = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Configuration related to the cluster control plane. - AzureControlPlane control_plane = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. Configuration related to the cluster RBAC settings. - AzureAuthorization authorization = 6 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The current state of the cluster. - State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The endpoint of the cluster's API server. - string endpoint = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A globally unique identifier for the cluster. - string uid = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If set, there are currently changes in flight to the cluster. - bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this cluster was created. - google.protobuf.Timestamp create_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this cluster was last updated. - google.protobuf.Timestamp update_time = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Allows clients to perform consistent read-modify-writes - // through optimistic concurrency control. - // - // Can be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 13; - - // Optional. Annotations on the cluster. - // - // This field has the same restrictions as Kubernetes annotations. - // The total size of all keys and values combined is limited to 256k. - // Keys can have 2 segments: prefix (optional) and name (required), - // separated by a slash (/). - // Prefix must be a DNS subdomain. - // Name must be 63 characters or less, begin and end with alphanumerics, - // with dashes (-), underscores (_), dots (.), and alphanumerics between. - map annotations = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Workload Identity settings. - WorkloadIdentityConfig workload_identity_config = 18 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. PEM encoded x509 certificate of the cluster root of trust. - string cluster_ca_certificate = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. Fleet configuration. - Fleet fleet = 20 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Managed Azure resources for this cluster. - AzureClusterResources managed_resources = 21 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Logging configuration for this cluster. - LoggingConfig logging_config = 23 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. A set of errors found in the cluster. - repeated AzureClusterError errors = 24 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Monitoring configuration for this cluster. - MonitoringConfig monitoring_config = 25 - [(google.api.field_behavior) = OPTIONAL]; -} - -// ClusterNetworking contains cluster-wide networking configuration. -message AzureClusterNetworking { - // Required. The Azure Resource Manager (ARM) ID of the VNet associated with - // your cluster. - // - // All components in the cluster (i.e. control plane and node pools) run on a - // single VNet. - // - // Example: - // `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/` - // - // This field cannot be changed after creation. - string virtual_network_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The IP address range of the pods in this cluster, in CIDR - // notation (e.g. `10.96.0.0/14`). - // - // All pods in the cluster get assigned a unique IPv4 address from these - // ranges. Only a single range is supported. - // - // This field cannot be changed after creation. - repeated string pod_address_cidr_blocks = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The IP address range for services in this cluster, in CIDR - // notation (e.g. `10.96.0.0/14`). - // - // All services in the cluster get assigned a unique IPv4 address from these - // ranges. Only a single range is supported. - // - // This field cannot be changed after creating a cluster. - repeated string service_address_cidr_blocks = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The ARM ID of the subnet where Kubernetes private service type - // load balancers are deployed. When unspecified, it defaults to - // AzureControlPlane.subnet_id. - // - // Example: - // "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - string service_load_balancer_subnet_id = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// AzureControlPlane represents the control plane configurations. -message AzureControlPlane { - // Required. The Kubernetes version to run on control plane replicas - // (e.g. `1.19.10-gke.1000`). - // - // You can list all supported versions on a given Google Cloud region by - // calling - // [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. - string version = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The ARM ID of the default subnet for the control plane. The - // control plane VMs are deployed in this subnet, unless - // `AzureControlPlane.replica_placements` is specified. This subnet will also - // be used as default for `AzureControlPlane.endpoint_subnet_id` if - // `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will - // be used as default for - // `AzureClusterNetworking.service_load_balancer_subnet_id`. - // - // Example: - // `/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/default`. - string subnet_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - // - // For available VM sizes, see - // https://docs.microsoft.com/en-us/azure/virtual-machines/vm-naming-conventions. - // - // When unspecified, it defaults to `Standard_DS2_v2`. - string vm_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Required. SSH configuration for how to access the underlying control plane - // machines. - AzureSshConfig ssh_config = 11 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Configuration related to the root volume provisioned for each - // control plane replica. - // - // When unspecified, it defaults to 32-GiB Azure Disk. - AzureDiskTemplate root_volume = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration related to the main volume provisioned for each - // control plane replica. - // The main volume is in charge of storing all of the cluster's etcd state. - // - // When unspecified, it defaults to a 8-GiB Azure Disk. - AzureDiskTemplate main_volume = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration related to application-layer secrets encryption. - AzureDatabaseEncryption database_encryption = 10 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Proxy configuration for outbound HTTP(S) traffic. - AzureProxyConfig proxy_config = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration related to vm config encryption. - AzureConfigEncryption config_encryption = 14 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A set of tags to apply to all underlying control plane Azure - // resources. - map tags = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for where to place the control plane replicas. - // - // Up to three replica placement instances can be specified. If - // replica_placements is set, the replica placement instances will be applied - // to the three control plane replicas as evenly as possible. - repeated ReplicaPlacement replica_placements = 13 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The ARM ID of the subnet where the control plane load balancer is - // deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. - // - // Example: - // "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" - string endpoint_subnet_id = 15 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for the placement of a control plane replica. -message ReplicaPlacement { - // Required. For a given replica, the ARM ID of the subnet where the control - // plane VM is deployed. Make sure it's a subnet under the virtual network in - // the cluster configuration. - string subnet_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. For a given replica, the Azure availability zone where to - // provision the control plane VM and the ETCD disk. - string azure_availability_zone = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Details of a proxy config stored in Azure Key Vault. -message AzureProxyConfig { - // The ARM ID the of the resource group containing proxy keyvault. - // - // Resource group ids are formatted as - // `/subscriptions//resourceGroups/`. - string resource_group_id = 1; - - // The URL the of the proxy setting secret with its version. - // - // The secret must be a JSON encoded proxy configuration - // as described in - // https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file - // - // Secret ids are formatted as - // `https://.vault.azure.net/secrets//`. - string secret_id = 2; -} - -// Configuration related to application-layer secrets encryption. -// -// Anthos clusters on Azure encrypts your Kubernetes data at rest -// in etcd using Azure Key Vault. -message AzureDatabaseEncryption { - // Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt data. - // - // For example: - // `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - // Encryption will always take the latest version of the key and hence - // specific version is not supported. - string key_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Configuration related to config data encryption. -// -// Azure VM bootstrap secret is envelope encrypted with the provided key vault -// key. -message AzureConfigEncryption { - // Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config - // data. - // - // For example: - // `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` - string key_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. RSA key of the Azure Key Vault public key to use for encrypting - // the data. - // - // This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) - // in ASN.1 DER form. The string must be comprised of a single PEM block of - // type "PUBLIC KEY". - string public_key = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for Azure Disks. -message AzureDiskTemplate { - // Optional. The size of the disk, in GiBs. - // - // When unspecified, a default value is provided. See the specific reference - // in the parent resource. - int32 size_gib = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// `AzureClient` resources hold client authentication information needed by the -// Anthos Multi-Cloud API to manage Azure resources on your Azure subscription. -// -// When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is -// created, an `AzureClient` resource needs to be provided and all operations on -// Azure resources associated to that cluster will authenticate to Azure -// services using the given client. -// -// `AzureClient` resources are immutable and cannot be modified upon creation. -// -// Each `AzureClient` resource is bound to a single Azure Active Directory -// Application and tenant. -message AzureClient { - option (google.api.resource) = { - type: "gkemulticloud.googleapis.com/AzureClient" - pattern: "projects/{project}/locations/{location}/azureClients/{azure_client}" - }; - - // The name of this resource. - // - // `AzureClient` resource names are formatted as - // `projects//locations//azureClients/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1; - - // Required. The Azure Active Directory Tenant ID. - string tenant_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Azure Active Directory Application ID. - string application_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Annotations on the resource. - // - // This field has the same restrictions as Kubernetes annotations. - // The total size of all keys and values combined is limited to 256k. - // Keys can have 2 segments: prefix (optional) and name (required), - // separated by a slash (/). - // Prefix must be a DNS subdomain. - // Name must be 63 characters or less, begin and end with alphanumerics, - // with dashes (-), underscores (_), dots (.), and alphanumerics between. - map annotations = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The PEM encoded x509 certificate. - string pem_certificate = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A globally unique identifier for the client. - string uid = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this resource was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration related to the cluster RBAC settings. -message AzureAuthorization { - // Required. Users that can perform operations as a cluster admin. A managed - // ClusterRoleBinding will be created to grant the `cluster-admin` ClusterRole - // to the users. Up to ten admin users can be provided. - // - // For more info on RBAC, see - // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - repeated AzureClusterUser admin_users = 1 - [(google.api.field_behavior) = REQUIRED]; -} - -// Identities of a user-type subject for Azure clusters. -message AzureClusterUser { - // Required. The name of the user, e.g. `my-gcp-id@gmail.com`. - string username = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// An Anthos node pool running on Azure. -message AzureNodePool { - option (google.api.resource) = { - type: "gkemulticloud.googleapis.com/AzureNodePool" - pattern: "projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}" - }; - - // The lifecycle state of the node pool. - enum State { - // Not set. - STATE_UNSPECIFIED = 0; - - // The PROVISIONING state indicates the node pool is being created. - PROVISIONING = 1; - - // The RUNNING state indicates the node pool has been created and is fully - // usable. - RUNNING = 2; - - // The RECONCILING state indicates that the node pool is being reconciled. - RECONCILING = 3; - - // The STOPPING state indicates the node pool is being deleted. - STOPPING = 4; - - // The ERROR state indicates the node pool is in a broken unrecoverable - // state. - ERROR = 5; - - // The DEGRADED state indicates the node pool requires user action to - // restore full functionality. - DEGRADED = 6; - } - - // The name of this resource. - // - // Node pool names are formatted as - // `projects//locations//azureClusters//azureNodePools/`. - // - // For more details on Google Cloud resource names, - // see [Resource Names](https://cloud.google.com/apis/design/resource_names) - string name = 1; - - // Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this - // node pool. - string version = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The node configuration of the node pool. - AzureNodeConfig config = 22 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ARM ID of the subnet where the node pool VMs run. Make sure - // it's a subnet under the virtual network in the cluster configuration. - string subnet_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Autoscaler configuration for this node pool. - AzureNodePoolAutoscaling autoscaling = 4 - [(google.api.field_behavior) = REQUIRED]; - - // Output only. The current state of the node pool. - State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A globally unique identifier for the node pool. - string uid = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If set, there are currently pending changes to the node - // pool. - bool reconciling = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this node pool was created. - google.protobuf.Timestamp create_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this node pool was last updated. - google.protobuf.Timestamp update_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Allows clients to perform consistent read-modify-writes - // through optimistic concurrency control. - // - // Can be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 12; - - // Optional. Annotations on the node pool. - // - // This field has the same restrictions as Kubernetes annotations. - // The total size of all keys and values combined is limited to 256k. - // Keys can have 2 segments: prefix (optional) and name (required), - // separated by a slash (/). - // Prefix must be a DNS subdomain. - // Name must be 63 characters or less, begin and end with alphanumerics, - // with dashes (-), underscores (_), dots (.), and alphanumerics between. - map annotations = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The constraint on the maximum number of pods that can be run - // simultaneously on a node in the node pool. - MaxPodsConstraint max_pods_constraint = 21 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The Azure availability zone of the nodes in this nodepool. - // - // When unspecified, it defaults to `1`. - string azure_availability_zone = 23 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. A set of errors found in the node pool. - repeated AzureNodePoolError errors = 29 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Parameters that describe the configuration of all node machines -// on a given node pool. -message AzureNodeConfig { - // Optional. The Azure VM size name. Example: `Standard_DS2_v2`. - // - // See [Supported VM - // sizes](/anthos/clusters/docs/azure/reference/supported-vms) for options. - // - // When unspecified, it defaults to `Standard_DS2_v2`. - string vm_size = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration related to the root volume provisioned for each - // node pool machine. - // - // When unspecified, it defaults to a 32-GiB Azure Disk. - AzureDiskTemplate root_volume = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A set of tags to apply to all underlying Azure resources for this - // node pool. This currently only includes Virtual Machine Scale Sets. - // - // Specify at most 50 pairs containing alphanumerics, spaces, and symbols - // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to - // 255 Unicode characters. - map tags = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The OS image type to use on node pool instances. - // Can have a value of `ubuntu`, or `windows` if the cluster enables - // the Windows node pool preview feature. - // - // When unspecified, it defaults to `ubuntu`. - string image_type = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Required. SSH configuration for how to access the node pool machines. - AzureSshConfig ssh_config = 7 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Proxy configuration for outbound HTTP(S) traffic. - AzureProxyConfig proxy_config = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration related to vm config encryption. - AzureConfigEncryption config_encryption = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The initial taints assigned to nodes of this node pool. - repeated NodeTaint taints = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The initial labels assigned to nodes of this node pool. An object - // containing a list of "key": value pairs. Example: { "name": "wrench", - // "mass": "1.3kg", "count": "3" }. - map labels = 11 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration related to Kubernetes cluster autoscaler. -// -// The Kubernetes cluster autoscaler will automatically adjust the -// size of the node pool based on the cluster load. -message AzureNodePoolAutoscaling { - // Required. Minimum number of nodes in the node pool. Must be greater than or - // equal to 1 and less than or equal to max_node_count. - int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Maximum number of nodes in the node pool. Must be greater than or - // equal to min_node_count and less than or equal to 50. - int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// AzureServerConfig contains information about a Google Cloud location, such as -// supported Azure regions and Kubernetes versions. -message AzureServerConfig { - option (google.api.resource) = { - type: "gkemulticloud.googleapis.com/AzureServerConfig" - pattern: "projects/{project}/locations/{location}/azureServerConfig" - }; - - // The `AzureServerConfig` resource name. - // - // `AzureServerConfig` names are formatted as - // `projects//locations//azureServerConfig`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string name = 1; - - // List of valid Kubernetes versions. - repeated AzureK8sVersionInfo valid_versions = 2; - - // The list of supported Azure regions. - repeated string supported_azure_regions = 3; -} - -// Information about a supported Kubernetes version. -message AzureK8sVersionInfo { - // A supported Kubernetes version (for example, `1.19.10-gke.1000`) - string version = 1; -} - -// SSH configuration for Azure resources. -message AzureSshConfig { - // Required. The SSH public key data for VMs managed by Anthos. This accepts - // the authorized_keys file format used in OpenSSH according to the sshd(8) - // manual page. - string authorized_key = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Managed Azure resources for the cluster. -// -// The values could change and be empty, depending on the state of the cluster. -message AzureClusterResources { - // Output only. The ARM ID of the cluster network security group. - string network_security_group_id = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ARM ID of the control plane application security group. - string control_plane_application_security_group_id = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// AzureClusterError describes errors found on Azure clusters. -message AzureClusterError { - // Human-friendly description of the error. - string message = 1; -} - -// AzureNodePoolError describes errors found on Azure node pools. -message AzureNodePoolError { - // Human-friendly description of the error. - string message = 1; -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_service.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_service.proto deleted file mode 100644 index 2593468ad42..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/azure_service.proto +++ /dev/null @@ -1,773 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.gkemulticloud.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/gkemulticloud/v1/azure_resources.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; -option java_multiple_files = true; -option java_outer_classname = "AzureServiceProto"; -option java_package = "com.google.cloud.gkemulticloud.v1"; -option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; -option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; - -// The AzureClusters API provides a single centrally managed service -// to create and manage Anthos clusters that run on Azure infrastructure. -service AzureClusters { - option (google.api.default_host) = "gkemulticloud.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - // resource on a given Google Cloud project and region. - // - // `AzureClient` resources hold client authentication - // information needed by the Anthos Multicloud API to manage Azure resources - // on your Azure subscription on your behalf. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc CreateAzureClient(CreateAzureClientRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/azureClients" - body: "azure_client" - }; - option (google.api.method_signature) = - "parent,azure_client,azure_client_id"; - option (google.longrunning.operation_info) = { - response_type: "AzureClient" - metadata_type: "OperationMetadata" - }; - } - - // Describes a specific - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. - rpc GetAzureClient(GetAzureClientRequest) returns (AzureClient) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/azureClients/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - // resources on a given Google Cloud project and region. - rpc ListAzureClients(ListAzureClientsRequest) - returns (ListAzureClientsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/azureClients" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - // resource. - // - // If the client is used by one or more clusters, deletion will - // fail and a `FAILED_PRECONDITION` error will be returned. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc DeleteAzureClient(DeleteAzureClientRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/azureClients/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - // resource on a given GCP project and region. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc CreateAzureCluster(CreateAzureClusterRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/azureClusters" - body: "azure_cluster" - }; - option (google.api.method_signature) = - "parent,azure_cluster,azure_cluster_id"; - option (google.longrunning.operation_info) = { - response_type: "AzureCluster" - metadata_type: "OperationMetadata" - }; - } - - // Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - rpc UpdateAzureCluster(UpdateAzureClusterRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}" - body: "azure_cluster" - }; - option (google.api.method_signature) = "azure_cluster,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "AzureCluster" - metadata_type: "OperationMetadata" - }; - } - - // Describes a specific - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - rpc GetAzureCluster(GetAzureClusterRequest) returns (AzureCluster) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/azureClusters/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - // resources on a given Google Cloud project and region. - rpc ListAzureClusters(ListAzureClustersRequest) - returns (ListAzureClustersResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/azureClusters" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a specific - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - // - // Fails if the cluster has one or more associated - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc DeleteAzureCluster(DeleteAzureClusterRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/azureClusters/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Generates a short-lived access token to authenticate to a given - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - rpc GenerateAzureAccessToken(GenerateAzureAccessTokenRequest) - returns (GenerateAzureAccessTokenResponse) { - option (google.api.http) = { - get: "/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessToken" - }; - } - - // Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], - // attached to a given - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc CreateAzureNodePool(CreateAzureNodePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools" - body: "azure_node_pool" - }; - option (google.api.method_signature) = - "parent,azure_node_pool,azure_node_pool_id"; - option (google.longrunning.operation_info) = { - response_type: "AzureNodePool" - metadata_type: "OperationMetadata" - }; - } - - // Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - rpc UpdateAzureNodePool(UpdateAzureNodePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" - body: "azure_node_pool" - }; - option (google.api.method_signature) = "azure_node_pool,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "AzureNodePool" - metadata_type: "OperationMetadata" - }; - } - - // Describes a specific - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. - rpc GetAzureNodePool(GetAzureNodePoolRequest) returns (AzureNodePool) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - // resources on a given - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - rpc ListAzureNodePools(ListAzureNodePoolsRequest) - returns (ListAzureNodePoolsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a specific - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. - // - // If successful, the response contains a newly created - // [Operation][google.longrunning.Operation] resource that can be - // described to track the status of the operation. - rpc DeleteAzureNodePool(DeleteAzureNodePoolRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Returns information, such as supported Azure regions and Kubernetes - // versions, on a given Google Cloud location. - rpc GetAzureServerConfig(GetAzureServerConfigRequest) - returns (AzureServerConfig) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/azureServerConfig}" - }; - option (google.api.method_signature) = "name"; - } -} - -// Request message for `AzureClusters.CreateAzureCluster` method. -message CreateAzureClusterRequest { - // Required. The parent location where this - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be - // created. - // - // Location names are formatted as `projects//locations/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AzureCluster" - } - ]; - - // Required. The specification of the - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. - AzureCluster azure_cluster = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A client provided ID the resource. Must be unique within the - // parent resource. - // - // The provided ID will be part of the - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name - // formatted as - // `projects//locations//azureClusters/`. - // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - string azure_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but do not actually create the cluster. - bool validate_only = 4; -} - -// Request message for `AzureClusters.UpdateAzureCluster` method. -message UpdateAzureClusterRequest { - // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - // resource to update. - AzureCluster azure_cluster = 1 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but do not actually update the cluster. - bool validate_only = 2; - - // Required. Mask of fields to update. At least one path must be supplied in - // this field. The elements of the repeated paths field can only include these - // fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: - // - // * `description`. - // * `azureClient`. - // * `control_plane.version`. - // * `control_plane.vm_size`. - // * `annotations`. - // * `authorization.admin_users`. - // * `control_plane.root_volume.size_gib`. - // * `control_plane.proxy_config`. - // * `control_plane.proxy_config.resource_group_id`. - // * `control_plane.proxy_config.secret_id`. - // * `control_plane.ssh_config.authorized_key`. - // * `logging_config.component_config.enable_components` - // * `monitoring_config.managed_prometheus_config.enabled`. - google.protobuf.FieldMask update_mask = 4 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `AzureClusters.GetAzureCluster` method. -message GetAzureClusterRequest { - // Required. The name of the - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - // describe. - // - // `AzureCluster` names are formatted as - // `projects//locations//azureClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AzureCluster" - } - ]; -} - -// Request message for `AzureClusters.ListAzureClusters` method. -message ListAzureClustersRequest { - // Required. The parent location which owns this collection of - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources. - // - // Location names are formatted as `projects//locations/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AzureCluster" - } - ]; - - // The maximum number of items to return. - // - // If not specified, a default value of 50 will be used by the service. - // Regardless of the pageSize value, the response can include a partial list - // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] - // to determine if there are more instances left to be queried. - int32 page_size = 2; - - // The `nextPageToken` value returned from a previous - // [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] - // request, if any. - string page_token = 3; -} - -// Response message for `AzureClusters.ListAzureClusters` method. -message ListAzureClustersResponse { - // A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - // resources in the specified GCP project and region region. - repeated AzureCluster azure_clusters = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for `Clusters.DeleteAzureCluster` method. -message DeleteAzureClusterRequest { - // Required. The resource name the - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. - // - // `AzureCluster` names are formatted as - // `projects//locations//azureClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AzureCluster" - } - ]; - - // If set to true, and the - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not - // found, the request will succeed but no action will be taken on the server - // and a completed [Operation][google.longrunning.Operation] will be returned. - // - // Useful for idempotent deletion. - bool allow_missing = 2; - - // If set, only validate the request, but do not actually delete the resource. - bool validate_only = 3; - - // The current etag of the - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - // - // Allows clients to perform deletions through optimistic concurrency control. - // - // If the provided etag does not match the current etag of the cluster, - // the request will fail and an ABORTED error will be returned. - string etag = 4; -} - -// Response message for `AzureClusters.CreateAzureNodePool` method. -message CreateAzureNodePoolRequest { - // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - // resource where this node pool will be created. - // - // Location names are formatted as `projects//locations/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AzureNodePool" - } - ]; - - // Required. The specification of the - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. - AzureNodePool azure_node_pool = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A client provided ID the resource. Must be unique within the - // parent resource. - // - // The provided ID will be part of the - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name - // formatted as - // `projects//locations//azureClusters//azureNodePools/`. - // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - string azure_node_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but do not actually create the node - // pool. - bool validate_only = 4; -} - -// Request message for `AzureClusters.UpdateAzureNodePool` method. -message UpdateAzureNodePoolRequest { - // Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - // resource to update. - AzureNodePool azure_node_pool = 1 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but don't actually update the node pool. - bool validate_only = 2; - - // Required. Mask of fields to update. At least one path must be supplied in - // this field. The elements of the repeated paths field can only include these - // fields from [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]: - // - // *. `annotations`. - // * `version`. - // * `autoscaling.min_node_count`. - // * `autoscaling.max_node_count`. - // * `config.ssh_config.authorized_key`. - google.protobuf.FieldMask update_mask = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for `AzureClusters.GetAzureNodePool` method. -message GetAzureNodePoolRequest { - // Required. The name of the - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to - // describe. - // - // `AzureNodePool` names are formatted as - // `projects//locations//azureClusters//azureNodePools/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AzureNodePool" - } - ]; -} - -// Request message for `AzureClusters.ListAzureNodePools` method. -message ListAzureNodePoolsRequest { - // Required. The parent `AzureCluster` which owns this collection of - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. - // - // `AzureCluster` names are formatted as - // `projects//locations//azureClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AzureNodePool" - } - ]; - - // The maximum number of items to return. - // - // If not specified, a default value of 50 will be used by the service. - // Regardless of the pageSize value, the response can include a partial list - // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] - // to determine if there are more instances left to be queried. - int32 page_size = 2; - - // The `nextPageToken` value returned from a previous - // [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] - // request, if any. - string page_token = 3; -} - -// Response message for `AzureClusters.ListAzureNodePools` method. -message ListAzureNodePoolsResponse { - // A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - // resources in the specified `AzureCluster`. - repeated AzureNodePool azure_node_pools = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Delete message for `AzureClusters.DeleteAzureNodePool` method. -message DeleteAzureNodePoolRequest { - // Required. The resource name the - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. - // - // `AzureNodePool` names are formatted as - // `projects//locations//azureClusters//azureNodePools/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AzureNodePool" - } - ]; - - // If set, only validate the request, but do not actually delete the node - // pool. - bool validate_only = 2; - - // If set to true, and the - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is - // not found, the request will succeed but no action will be taken on the - // server and a completed [Operation][google.longrunning.Operation] will be - // returned. - // - // Useful for idempotent deletion. - bool allow_missing = 3; - - // The current ETag of the - // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - // - // Allows clients to perform deletions through optimistic concurrency control. - // - // If the provided ETag does not match the current etag of the node pool, - // the request will fail and an ABORTED error will be returned. - string etag = 4; -} - -// GetAzureServerConfigRequest gets the server config of GKE cluster on Azure. -message GetAzureServerConfigRequest { - // Required. The name of the - // [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] - // resource to describe. - // - // `AzureServerConfig` names are formatted as - // `projects//locations//azureServerConfig`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AzureServerConfig" - } - ]; -} - -// Request message for `AzureClusters.CreateAzureClient` method. -message CreateAzureClientRequest { - // Required. The parent location where this - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be - // created. - // - // Location names are formatted as `projects//locations/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AzureClient" - } - ]; - - // Required. The specification of the - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. - AzureClient azure_client = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A client provided ID the resource. Must be unique within the - // parent resource. - // - // The provided ID will be part of the - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name - // formatted as - // `projects//locations//azureClients/`. - // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - string azure_client_id = 4 [(google.api.field_behavior) = REQUIRED]; - - // If set, only validate the request, but do not actually create the client. - bool validate_only = 3; -} - -// Request message for `AzureClusters.GetAzureClient` method. -message GetAzureClientRequest { - // Required. The name of the - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to - // describe. - // - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - // formatted as - // `projects//locations//azureClients/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AzureClient" - } - ]; -} - -// Request message for `AzureClusters.ListAzureClients` method. -message ListAzureClientsRequest { - // Required. The parent location which owns this collection of - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources. - // - // Location names are formatted as `projects//locations/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on GCP resource names. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "gkemulticloud.googleapis.com/AzureClient" - } - ]; - - // The maximum number of items to return. - // - // If not specified, a default value of 50 will be used by the service. - // Regardless of the pageSize value, the response can include a partial list - // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] - // to determine if there are more instances left to be queried. - int32 page_size = 2; - - // The `nextPageToken` value returned from a previous - // [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] - // request, if any. - string page_token = 3; -} - -// Response message for `AzureClusters.ListAzureClients` method. -message ListAzureClientsResponse { - // A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - // resources in the specified Google Cloud project and region region. - repeated AzureClient azure_clients = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for `AzureClusters.DeleteAzureClient` method. -message DeleteAzureClientRequest { - // Required. The resource name the - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. - // - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are - // formatted as - // `projects//locations//azureClients/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AzureClient" - } - ]; - - // If set to true, and the - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not - // found, the request will succeed but no action will be taken on the server - // and a completed [Operation][google.longrunning.Operation] will be returned. - // - // Useful for idempotent deletion. - bool allow_missing = 2; - - // If set, only validate the request, but do not actually delete the resource. - bool validate_only = 3; -} - -// Request message for `AzureClusters.GenerateAzureAccessToken` method. -message GenerateAzureAccessTokenRequest { - // Required. The name of the - // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to - // authenticate to. - // - // `AzureCluster` names are formatted as - // `projects//locations//AzureClusters/`. - // - // See [Resource Names](https://cloud.google.com/apis/design/resource_names) - // for more details on Google Cloud resource names. - string azure_cluster = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "gkemulticloud.googleapis.com/AzureCluster" - } - ]; -} - -// Response message for `AzureClusters.GenerateAzureAccessToken` method. -message GenerateAzureAccessTokenResponse { - // Output only. Access token to authenticate to k8s api-server. - string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Timestamp at which the token will expire. - google.protobuf.Timestamp expiration_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/common_resources.proto b/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/common_resources.proto deleted file mode 100644 index ba34f50b4c5..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/common_resources.proto +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.gkemulticloud.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.GkeMultiCloud.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1;gkemulticloud"; -option java_multiple_files = true; -option java_outer_classname = "CommonResourcesProto"; -option java_package = "com.google.cloud.gkemulticloud.v1"; -option php_namespace = "Google\\Cloud\\GkeMultiCloud\\V1"; -option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; - -// Workload Identity settings. -message WorkloadIdentityConfig { - // The OIDC issuer URL for this cluster. - string issuer_uri = 1; - - // The Workload Identity Pool associated to the cluster. - string workload_pool = 2; - - // The ID of the OIDC Identity Provider (IdP) associated to the Workload - // Identity Pool. - string identity_provider = 3; -} - -// Constraints applied to pods. -message MaxPodsConstraint { - // Required. The maximum number of pods to schedule on a single node. - int64 max_pods_per_node = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Metadata about a long-running operation. -message OperationMetadata { - // Output only. The time at which this operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this operation was completed. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the resource associated to this operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_detail = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of any error that occurred during the - // operation. - string error_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The verb associated with the API method which triggered this - // operation. Possible values are "create", "delete", "update" and "import". - string verb = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether it has been requested cancellation - // for 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]; -} - -// The taint content for the node taint. -message NodeTaint { - // The taint effect. - enum Effect { - // Not set. - EFFECT_UNSPECIFIED = 0; - - // Do not allow new pods to schedule onto the node unless they tolerate the - // taint, but allow all pods submitted to Kubelet without going through the - // scheduler to start, and allow all already-running pods to continue - // running. Enforced by the scheduler. - NO_SCHEDULE = 1; - - // Like TaintEffectNoSchedule, but the scheduler tries not to schedule - // new pods onto the node, rather than prohibiting new pods from scheduling - // onto the node entirely. Enforced by the scheduler. - PREFER_NO_SCHEDULE = 2; - - // Evict any already-running pods that do not tolerate the taint. - // Currently enforced by NodeController. - NO_EXECUTE = 3; - } - - // Required. Key for the taint. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Value for the taint. - string value = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The taint effect. - Effect effect = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Fleet related configuration. -// -// Fleets are a Google Cloud concept for logically organizing clusters, -// letting you use and manage multi-cluster capabilities and apply -// consistent policies across your systems. -// -// See [Anthos -// Fleets](https://cloud.google.com/anthos/multicluster-management/fleets) for -// more details on Anthos multi-cluster capabilities using Fleets. -message Fleet { - // Required. The name of the Fleet host project where this cluster will be - // registered. - // - // Project names are formatted as - // `projects/`. - string project = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The name of the managed Hub Membership resource associated to - // this cluster. - // - // Membership names are formatted as - // `projects//locations/global/membership/`. - string membership = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Parameters that describe the Logging configuration in a cluster. -message LoggingConfig { - // The configuration of the logging components; - LoggingComponentConfig component_config = 1; -} - -// Parameters that describe the Logging component configuration in a cluster. -message LoggingComponentConfig { - // The components of the logging configuration; - enum Component { - // No component is specified - COMPONENT_UNSPECIFIED = 0; - - // This indicates that system logging components is enabled. - SYSTEM_COMPONENTS = 1; - - // This indicates that user workload logging component is enabled. - WORKLOADS = 2; - } - - // The components to be enabled. - repeated Component enable_components = 1; -} - -// Parameters that describe the Monitoring configuration in a cluster. -message MonitoringConfig { - // Enable Google Cloud Managed Service for Prometheus in the cluster. - ManagedPrometheusConfig managed_prometheus_config = 2; -} - -// ManagedPrometheusConfig defines the configuration for -// Google Cloud Managed Service for Prometheus. -message ManagedPrometheusConfig { - // Enable Managed Collection. - bool enabled = 1; -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_cluster.js deleted file mode 100644 index 95e2fa44f29..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_cluster.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, awsCluster, awsClusterId) { - // [START gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 location where this - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const parent = 'abc123' - /** - * Required. The specification of the - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster to create. - */ - // const awsCluster = {} - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource name - * formatted as - * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ - // const awsClusterId = 'abc123' - /** - * If set, only validate the request, but do not actually create the cluster. - */ - // const validateOnly = true - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callCreateAwsCluster() { - // Construct request - const request = { - parent, - awsCluster, - awsClusterId, - }; - - // Run request - const [operation] = await gkemulticloudClient.createAwsCluster(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAwsCluster(); - // [END gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_node_pool.js deleted file mode 100644 index acc6639b2ff..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.create_aws_node_pool.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, awsNodePool, awsNodePoolId) { - // [START gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 AwsCluster google.cloud.gkemulticloud.v1.AwsCluster - * resource where this node pool will be created. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const parent = 'abc123' - /** - * Required. The specification of the - * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool to create. - */ - // const awsNodePool = {} - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ - // const awsNodePoolId = 'abc123' - /** - * If set, only validate the request, but do not actually create the node - * pool. - */ - // const validateOnly = true - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callCreateAwsNodePool() { - // Construct request - const request = { - parent, - awsNodePool, - awsNodePoolId, - }; - - // Run request - const [operation] = await gkemulticloudClient.createAwsNodePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAwsNodePool(); - // [END gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_cluster.js deleted file mode 100644 index b8660853955..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_cluster.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name the - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster to delete. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - */ - // const name = 'abc123' - /** - * If set, only validate the request, but do not actually delete the resource. - */ - // const validateOnly = true - /** - * If set to true, and the - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed Operation google.longrunning.Operation will be returned. - * Useful for idempotent deletion. - */ - // const allowMissing = true - /** - * The current etag of the - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - */ - // const etag = 'abc123' - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callDeleteAwsCluster() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await gkemulticloudClient.deleteAwsCluster(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteAwsCluster(); - // [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_node_pool.js deleted file mode 100644 index d5d83394596..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.delete_aws_node_pool.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name the - * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool to delete. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const name = 'abc123' - /** - * If set, only validate the request, but do not actually delete the node - * pool. - */ - // const validateOnly = true - /** - * If set to true, and the - * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed Operation google.longrunning.Operation will be returned. - * Useful for idempotent deletion. - */ - // const allowMissing = true - /** - * The current ETag of the - * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - */ - // const etag = 'abc123' - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callDeleteAwsNodePool() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await gkemulticloudClient.deleteAwsNodePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteAwsNodePool(); - // [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.generate_aws_access_token.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.generate_aws_access_token.js deleted file mode 100644 index b5c1980aad4..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.generate_aws_access_token.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(awsCluster) { - // [START gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to - * authenticate to. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const awsCluster = 'abc123' - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callGenerateAwsAccessToken() { - // Construct request - const request = { - awsCluster, - }; - - // Run request - const response = await gkemulticloudClient.generateAwsAccessToken(request); - console.log(response); - } - - callGenerateAwsAccessToken(); - // [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_cluster.js deleted file mode 100644 index 9a259c8d38e..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_cluster.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to - * describe. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - */ - // const name = 'abc123' - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callGetAwsCluster() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await gkemulticloudClient.getAwsCluster(request); - console.log(response); - } - - callGetAwsCluster(); - // [END gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_node_pool.js deleted file mode 100644 index 4c01379178b..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_node_pool.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource to - * describe. - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const name = 'abc123' - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callGetAwsNodePool() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await gkemulticloudClient.getAwsNodePool(request); - console.log(response); - } - - callGetAwsNodePool(); - // [END gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_server_config.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_server_config.js deleted file mode 100644 index 0b0ee2ed3c2..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.get_aws_server_config.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AwsServerConfig google.cloud.gkemulticloud.v1.AwsServerConfig resource - * to describe. - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const name = 'abc123' - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callGetAwsServerConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await gkemulticloudClient.getAwsServerConfig(request); - console.log(response); - } - - callGetAwsServerConfig(); - // [END gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_clusters.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_clusters.js deleted file mode 100644 index d451b475cec..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_clusters.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 location which owns this collection of - * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resources. - * Location names are formatted as `projects//locations/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token - * to determine if there are more instances left to be queried. - */ - // const pageSize = 1234 - /** - * The `nextPageToken` value returned from a previous - * awsClusters.list google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters - * request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callListAwsClusters() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await gkemulticloudClient.listAwsClustersAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAwsClusters(); - // [END gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_node_pools.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_node_pools.js deleted file mode 100644 index 6811a491a65..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.list_aws_node_pools.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 `AwsCluster` which owns this collection of - * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resources. - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token - * to determine if there are more instances left to be queried. - */ - // const pageSize = 1234 - /** - * The `nextPageToken` value returned from a previous - * awsNodePools.list google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools - * request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callListAwsNodePools() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await gkemulticloudClient.listAwsNodePoolsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAwsNodePools(); - // [END gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_cluster.js deleted file mode 100644 index 464f1a8ba39..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_cluster.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(awsCluster, updateMask) { - // [START gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 AwsCluster google.cloud.gkemulticloud.v1.AwsCluster - * resource to update. - */ - // const awsCluster = {} - /** - * If set, only validate the request, but do not actually update the cluster. - */ - // const validateOnly = true - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from AwsCluster google.cloud.gkemulticloud.v1.AwsCluster: - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - */ - // const updateMask = {} - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callUpdateAwsCluster() { - // Construct request - const request = { - awsCluster, - updateMask, - }; - - // Run request - const [operation] = await gkemulticloudClient.updateAwsCluster(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateAwsCluster(); - // [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_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-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_node_pool.js deleted file mode 100644 index 74fbf00ad92..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/aws_clusters.update_aws_node_pool.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(awsNodePool, updateMask) { - // [START gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool - * resource to update. - */ - // const awsNodePool = {} - /** - * If set, only validate the request, but don't actually update the node pool. - */ - // const validateOnly = true - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool: - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - */ - // const updateMask = {} - - // Imports the Gkemulticloud library - const {AwsClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AwsClustersClient(); - - async function callUpdateAwsNodePool() { - // Construct request - const request = { - awsNodePool, - updateMask, - }; - - // Run request - const [operation] = await gkemulticloudClient.updateAwsNodePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateAwsNodePool(); - // [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_client.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_client.js deleted file mode 100644 index 312a4f413e6..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_client.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, azureClient, azureClientId) { - // [START gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 location where this - * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const parent = 'abc123' - /** - * Required. The specification of the - * AzureClient google.cloud.gkemulticloud.v1.AzureClient to create. - */ - // const azureClient = {} - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource name - * formatted as - * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ - // const azureClientId = 'abc123' - /** - * If set, only validate the request, but do not actually create the client. - */ - // const validateOnly = true - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callCreateAzureClient() { - // Construct request - const request = { - parent, - azureClient, - azureClientId, - }; - - // Run request - const [operation] = await gkemulticloudClient.createAzureClient(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAzureClient(); - // [END gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_cluster.js deleted file mode 100644 index af1cd2873e1..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_cluster.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, azureCluster, azureClusterId) { - // [START gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 location where this - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource will be - * created. - * Location names are formatted as `projects//locations/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const parent = 'abc123' - /** - * Required. The specification of the - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster to create. - */ - // const azureCluster = {} - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource name - * formatted as - * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ - // const azureClusterId = 'abc123' - /** - * If set, only validate the request, but do not actually create the cluster. - */ - // const validateOnly = true - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callCreateAzureCluster() { - // Construct request - const request = { - parent, - azureCluster, - azureClusterId, - }; - - // Run request - const [operation] = await gkemulticloudClient.createAzureCluster(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAzureCluster(); - // [END gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_node_pool.js deleted file mode 100644 index 6ffd6fbc320..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.create_azure_node_pool.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, azureNodePool, azureNodePoolId) { - // [START gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 AzureCluster google.cloud.gkemulticloud.v1.AzureCluster - * resource where this node pool will be created. - * Location names are formatted as `projects//locations/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const parent = 'abc123' - /** - * Required. The specification of the - * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool to create. - */ - // const azureNodePool = {} - /** - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * The provided ID will be part of the - * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. - */ - // const azureNodePoolId = 'abc123' - /** - * If set, only validate the request, but do not actually create the node - * pool. - */ - // const validateOnly = true - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callCreateAzureNodePool() { - // Construct request - const request = { - parent, - azureNodePool, - azureNodePoolId, - }; - - // Run request - const [operation] = await gkemulticloudClient.createAzureNodePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateAzureNodePool(); - // [END gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_client.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_client.js deleted file mode 100644 index 438122b811e..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_client.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name the - * AzureClient google.cloud.gkemulticloud.v1.AzureClient to delete. - * AzureClient google.cloud.gkemulticloud.v1.AzureClient names are - * formatted as - * `projects//locations//azureClients/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const name = 'abc123' - /** - * If set to true, and the - * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed Operation google.longrunning.Operation will be returned. - * Useful for idempotent deletion. - */ - // const allowMissing = true - /** - * If set, only validate the request, but do not actually delete the resource. - */ - // const validateOnly = true - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callDeleteAzureClient() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await gkemulticloudClient.deleteAzureClient(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteAzureClient(); - // [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_cluster.js deleted file mode 100644 index 092e250c149..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_cluster.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name the - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster to delete. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - */ - // const name = 'abc123' - /** - * If set to true, and the - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed Operation google.longrunning.Operation will be returned. - * Useful for idempotent deletion. - */ - // const allowMissing = true - /** - * If set, only validate the request, but do not actually delete the resource. - */ - // const validateOnly = true - /** - * The current etag of the - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - */ - // const etag = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callDeleteAzureCluster() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await gkemulticloudClient.deleteAzureCluster(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteAzureCluster(); - // [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_node_pool.js deleted file mode 100644 index 5fbd840e756..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.delete_azure_node_pool.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name the - * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool to delete. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const name = 'abc123' - /** - * If set, only validate the request, but do not actually delete the node - * pool. - */ - // const validateOnly = true - /** - * If set to true, and the - * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed Operation google.longrunning.Operation will be - * returned. - * Useful for idempotent deletion. - */ - // const allowMissing = true - /** - * The current ETag of the - * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool. - * Allows clients to perform deletions through optimistic concurrency control. - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - */ - // const etag = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callDeleteAzureNodePool() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await gkemulticloudClient.deleteAzureNodePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteAzureNodePool(); - // [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.generate_azure_access_token.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.generate_azure_access_token.js deleted file mode 100644 index 37b152847e3..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.generate_azure_access_token.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(azureCluster) { - // [START gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to - * authenticate to. - * `AzureCluster` names are formatted as - * `projects//locations//AzureClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const azureCluster = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callGenerateAzureAccessToken() { - // Construct request - const request = { - azureCluster, - }; - - // Run request - const response = await gkemulticloudClient.generateAzureAccessToken(request); - console.log(response); - } - - callGenerateAzureAccessToken(); - // [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_client.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_client.js deleted file mode 100644 index 2a37a7c5228..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_client.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource to - * describe. - * AzureClient google.cloud.gkemulticloud.v1.AzureClient names are - * formatted as - * `projects//locations//azureClients/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const name = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callGetAzureClient() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await gkemulticloudClient.getAzureClient(request); - console.log(response); - } - - callGetAzureClient(); - // [END gkemulticloud_v1_generated_AzureClusters_GetAzureClient_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_cluster.js deleted file mode 100644 index e2f6b162ecb..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_cluster.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to - * describe. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - */ - // const name = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callGetAzureCluster() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await gkemulticloudClient.getAzureCluster(request); - console.log(response); - } - - callGetAzureCluster(); - // [END gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_node_pool.js deleted file mode 100644 index 6270108c0e7..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_node_pool.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource to - * describe. - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const name = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callGetAzureNodePool() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await gkemulticloudClient.getAzureNodePool(request); - console.log(response); - } - - callGetAzureNodePool(); - // [END gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_server_config.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_server_config.js deleted file mode 100644 index c9054337c38..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.get_azure_server_config.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 - * AzureServerConfig google.cloud.gkemulticloud.v1.AzureServerConfig - * resource to describe. - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const name = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callGetAzureServerConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await gkemulticloudClient.getAzureServerConfig(request); - console.log(response); - } - - callGetAzureServerConfig(); - // [END gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clients.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clients.js deleted file mode 100644 index df70f546379..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clients.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 location which owns this collection of - * AzureClient google.cloud.gkemulticloud.v1.AzureClient resources. - * Location names are formatted as `projects//locations/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token - * to determine if there are more instances left to be queried. - */ - // const pageSize = 1234 - /** - * The `nextPageToken` value returned from a previous - * azureClients.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients - * request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callListAzureClients() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await gkemulticloudClient.listAzureClientsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAzureClients(); - // [END gkemulticloud_v1_generated_AzureClusters_ListAzureClients_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clusters.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clusters.js deleted file mode 100644 index 798c2bbbc80..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_clusters.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 location which owns this collection of - * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resources. - * Location names are formatted as `projects//locations/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token - * to determine if there are more instances left to be queried. - */ - // const pageSize = 1234 - /** - * The `nextPageToken` value returned from a previous - * azureClusters.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters - * request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callListAzureClusters() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await gkemulticloudClient.listAzureClustersAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAzureClusters(); - // [END gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_node_pools.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_node_pools.js deleted file mode 100644 index 56cf39e548d..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.list_azure_node_pools.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 `AzureCluster` which owns this collection of - * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resources. - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * See Resource Names (https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token - * to determine if there are more instances left to be queried. - */ - // const pageSize = 1234 - /** - * The `nextPageToken` value returned from a previous - * azureNodePools.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools - * request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callListAzureNodePools() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await gkemulticloudClient.listAzureNodePoolsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListAzureNodePools(); - // [END gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_cluster.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_cluster.js deleted file mode 100644 index 53c0359317d..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_cluster.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(azureCluster, updateMask) { - // [START gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 AzureCluster google.cloud.gkemulticloud.v1.AzureCluster - * resource to update. - */ - // const azureCluster = {} - /** - * If set, only validate the request, but do not actually update the cluster. - */ - // const validateOnly = true - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from AzureCluster google.cloud.gkemulticloud.v1.AzureCluster: - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - */ - // const updateMask = {} - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callUpdateAzureCluster() { - // Construct request - const request = { - azureCluster, - updateMask, - }; - - // Run request - const [operation] = await gkemulticloudClient.updateAzureCluster(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateAzureCluster(); - // [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_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-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_node_pool.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_node_pool.js deleted file mode 100644 index 1cd909bbc2e..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/azure_clusters.update_azure_node_pool.js +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(azureNodePool, updateMask) { - // [START gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool - * resource to update. - */ - // const azureNodePool = {} - /** - * If set, only validate the request, but don't actually update the node pool. - */ - // const validateOnly = true - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool: - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - */ - // const updateMask = {} - - // Imports the Gkemulticloud library - const {AzureClustersClient} = require('@google-cloud/gkemulticloud').v1; - - // Instantiates a client - const gkemulticloudClient = new AzureClustersClient(); - - async function callUpdateAzureNodePool() { - // Construct request - const request = { - azureNodePool, - updateMask, - }; - - // Run request - const [operation] = await gkemulticloudClient.updateAzureNodePool(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateAzureNodePool(); - // [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_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-gkemulticloud/v1/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json deleted file mode 100644 index 7651d08d27d..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json +++ /dev/null @@ -1,1711 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-gkemulticloud", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.gkemulticloud.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async", - "title": "AttachedClusters createAttachedCluster Sample", - "origin": "API_DEFINITION", - "description": " Creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "attached_clusters.create_attached_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedCluster", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "attached_cluster", - "type": ".google.cloud.gkemulticloud.v1.AttachedCluster" - }, - { - "name": "attached_cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AttachedClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" - }, - "method": { - "shortName": "CreateAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedCluster", - "service": { - "shortName": "AttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async", - "title": "AttachedClusters updateAttachedCluster Sample", - "origin": "API_DEFINITION", - "description": " Updates an [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].", - "canonical": true, - "file": "attached_clusters.update_attached_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedCluster", - "async": true, - "parameters": [ - { - "name": "attached_cluster", - "type": ".google.cloud.gkemulticloud.v1.AttachedCluster" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AttachedClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" - }, - "method": { - "shortName": "UpdateAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedCluster", - "service": { - "shortName": "AttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async", - "title": "AttachedClusters importAttachedCluster Sample", - "origin": "API_DEFINITION", - "description": " Imports creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource by importing an existing Fleet Membership resource. Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "attached_clusters.import_attached_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedCluster", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "fleet_membership", - "type": "TYPE_STRING" - }, - { - "name": "platform_version", - "type": "TYPE_STRING" - }, - { - "name": "distribution", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AttachedClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" - }, - "method": { - "shortName": "ImportAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedCluster", - "service": { - "shortName": "AttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async", - "title": "AttachedClusters getAttachedCluster Sample", - "origin": "API_DEFINITION", - "description": " Describes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.", - "canonical": true, - "file": "attached_clusters.get_attached_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AttachedCluster", - "client": { - "shortName": "AttachedClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" - }, - "method": { - "shortName": "GetAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedCluster", - "service": { - "shortName": "AttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async", - "title": "AttachedClusters listAttachedClusters Sample", - "origin": "API_DEFINITION", - "description": " Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources on a given Google Cloud project and region.", - "canonical": true, - "file": "attached_clusters.list_attached_clusters.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.ListAttachedClustersResponse", - "client": { - "shortName": "AttachedClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" - }, - "method": { - "shortName": "ListAttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters", - "service": { - "shortName": "AttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async", - "title": "AttachedClusters deleteAttachedCluster Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "attached_clusters.delete_attached_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "ignore_errors", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AttachedClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" - }, - "method": { - "shortName": "DeleteAttachedCluster", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedCluster", - "service": { - "shortName": "AttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async", - "title": "AttachedClusters getAttachedServerConfig Sample", - "origin": "API_DEFINITION", - "description": " Returns information, such as supported Kubernetes versions, on a given Google Cloud location.", - "canonical": true, - "file": "attached_clusters.get_attached_server_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAttachedServerConfig", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AttachedServerConfig", - "client": { - "shortName": "AttachedClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" - }, - "method": { - "shortName": "GetAttachedServerConfig", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig", - "service": { - "shortName": "AttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async", - "title": "AttachedClusters generateAttachedClusterInstallManifest Sample", - "origin": "API_DEFINITION", - "description": " Generates the install manifest to be installed on the target cluster.", - "canonical": true, - "file": "attached_clusters.generate_attached_cluster_install_manifest.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateAttachedClusterInstallManifest", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifest", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "attached_cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "platform_version", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse", - "client": { - "shortName": "AttachedClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" - }, - "method": { - "shortName": "GenerateAttachedClusterInstallManifest", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifest", - "service": { - "shortName": "AttachedClusters", - "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async", - "title": "AttachedClusters createAwsCluster Sample", - "origin": "API_DEFINITION", - "description": " Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "aws_clusters.create_aws_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAwsCluster", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsCluster", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "aws_cluster", - "type": ".google.cloud.gkemulticloud.v1.AwsCluster" - }, - { - "name": "aws_cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "CreateAwsCluster", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsCluster", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async", - "title": "AttachedClusters updateAwsCluster Sample", - "origin": "API_DEFINITION", - "description": " Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].", - "canonical": true, - "file": "aws_clusters.update_aws_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 89, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAwsCluster", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsCluster", - "async": true, - "parameters": [ - { - "name": "aws_cluster", - "type": ".google.cloud.gkemulticloud.v1.AwsCluster" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "UpdateAwsCluster", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsCluster", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async", - "title": "AttachedClusters getAwsCluster Sample", - "origin": "API_DEFINITION", - "description": " Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.", - "canonical": true, - "file": "aws_clusters.get_aws_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAwsCluster", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AwsCluster", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "GetAwsCluster", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsCluster", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async", - "title": "AttachedClusters listAwsClusters Sample", - "origin": "API_DEFINITION", - "description": " Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and region.", - "canonical": true, - "file": "aws_clusters.list_aws_clusters.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.ListAwsClustersResponse", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "ListAwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async", - "title": "AttachedClusters deleteAwsCluster Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "aws_clusters.delete_aws_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAwsCluster", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "DeleteAwsCluster", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsCluster", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async", - "title": "AttachedClusters generateAwsAccessToken Sample", - "origin": "API_DEFINITION", - "description": " Generates a short-lived access token to authenticate to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.", - "canonical": true, - "file": "aws_clusters.generate_aws_access_token.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateAwsAccessToken", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GenerateAwsAccessToken", - "async": true, - "parameters": [ - { - "name": "aws_cluster", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "GenerateAwsAccessToken", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GenerateAwsAccessToken", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async", - "title": "AttachedClusters createAwsNodePool Sample", - "origin": "API_DEFINITION", - "description": " Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "aws_clusters.create_aws_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAwsNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsNodePool", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "aws_node_pool", - "type": ".google.cloud.gkemulticloud.v1.AwsNodePool" - }, - { - "name": "aws_node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "CreateAwsNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsNodePool", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async", - "title": "AttachedClusters updateAwsNodePool Sample", - "origin": "API_DEFINITION", - "description": " Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].", - "canonical": true, - "file": "aws_clusters.update_aws_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 88, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAwsNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsNodePool", - "async": true, - "parameters": [ - { - "name": "aws_node_pool", - "type": ".google.cloud.gkemulticloud.v1.AwsNodePool" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "UpdateAwsNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsNodePool", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async", - "title": "AttachedClusters getAwsNodePool Sample", - "origin": "API_DEFINITION", - "description": " Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.", - "canonical": true, - "file": "aws_clusters.get_aws_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAwsNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsNodePool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AwsNodePool", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "GetAwsNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsNodePool", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async", - "title": "AttachedClusters listAwsNodePools Sample", - "origin": "API_DEFINITION", - "description": " Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].", - "canonical": true, - "file": "aws_clusters.list_aws_node_pools.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAwsNodePools", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "ListAwsNodePools", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async", - "title": "AttachedClusters deleteAwsNodePool Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "aws_clusters.delete_aws_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAwsNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsNodePool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "DeleteAwsNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsNodePool", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async", - "title": "AttachedClusters getAwsServerConfig Sample", - "origin": "API_DEFINITION", - "description": " Returns information, such as supported AWS regions and Kubernetes versions, on a given Google Cloud location.", - "canonical": true, - "file": "aws_clusters.get_aws_server_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAwsServerConfig", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AwsServerConfig", - "client": { - "shortName": "AwsClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AwsClustersClient" - }, - "method": { - "shortName": "GetAwsServerConfig", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig", - "service": { - "shortName": "AwsClusters", - "fullName": "google.cloud.gkemulticloud.v1.AwsClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async", - "title": "AttachedClusters createAzureClient Sample", - "origin": "API_DEFINITION", - "description": " Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project and region. `AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "azure_clusters.create_azure_client.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAzureClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureClient", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "azure_client", - "type": ".google.cloud.gkemulticloud.v1.AzureClient" - }, - { - "name": "azure_client_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "CreateAzureClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureClient", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async", - "title": "AttachedClusters getAzureClient Sample", - "origin": "API_DEFINITION", - "description": " Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.", - "canonical": true, - "file": "azure_clusters.get_azure_client.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAzureClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureClient", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AzureClient", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "GetAzureClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureClient", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async", - "title": "AttachedClusters listAzureClients Sample", - "origin": "API_DEFINITION", - "description": " Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and region.", - "canonical": true, - "file": "azure_clusters.list_azure_clients.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAzureClients", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.ListAzureClientsResponse", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "ListAzureClients", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async", - "title": "AttachedClusters deleteAzureClient Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "azure_clusters.delete_azure_client.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAzureClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureClient", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "DeleteAzureClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureClient", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async", - "title": "AttachedClusters createAzureCluster Sample", - "origin": "API_DEFINITION", - "description": " Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "azure_clusters.create_azure_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAzureCluster", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureCluster", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "azure_cluster", - "type": ".google.cloud.gkemulticloud.v1.AzureCluster" - }, - { - "name": "azure_cluster_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "CreateAzureCluster", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureCluster", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async", - "title": "AttachedClusters updateAzureCluster Sample", - "origin": "API_DEFINITION", - "description": " Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].", - "canonical": true, - "file": "azure_clusters.update_azure_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAzureCluster", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureCluster", - "async": true, - "parameters": [ - { - "name": "azure_cluster", - "type": ".google.cloud.gkemulticloud.v1.AzureCluster" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "UpdateAzureCluster", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureCluster", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async", - "title": "AttachedClusters getAzureCluster Sample", - "origin": "API_DEFINITION", - "description": " Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.", - "canonical": true, - "file": "azure_clusters.get_azure_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAzureCluster", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureCluster", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AzureCluster", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "GetAzureCluster", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureCluster", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async", - "title": "AttachedClusters listAzureClusters Sample", - "origin": "API_DEFINITION", - "description": " Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and region.", - "canonical": true, - "file": "azure_clusters.list_azure_clusters.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.ListAzureClustersResponse", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "ListAzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async", - "title": "AttachedClusters deleteAzureCluster Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "azure_clusters.delete_azure_cluster.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAzureCluster", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureCluster", - "async": true, - "parameters": [ - { - "name": "name", - "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": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "DeleteAzureCluster", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureCluster", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async", - "title": "AttachedClusters generateAzureAccessToken Sample", - "origin": "API_DEFINITION", - "description": " Generates a short-lived access token to authenticate to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.", - "canonical": true, - "file": "azure_clusters.generate_azure_access_token.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GenerateAzureAccessToken", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GenerateAzureAccessToken", - "async": true, - "parameters": [ - { - "name": "azure_cluster", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "GenerateAzureAccessToken", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GenerateAzureAccessToken", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async", - "title": "AttachedClusters createAzureNodePool Sample", - "origin": "API_DEFINITION", - "description": " Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "azure_clusters.create_azure_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAzureNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureNodePool", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "azure_node_pool", - "type": ".google.cloud.gkemulticloud.v1.AzureNodePool" - }, - { - "name": "azure_node_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "CreateAzureNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureNodePool", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async", - "title": "AttachedClusters updateAzureNodePool Sample", - "origin": "API_DEFINITION", - "description": " Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].", - "canonical": true, - "file": "azure_clusters.update_azure_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAzureNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureNodePool", - "async": true, - "parameters": [ - { - "name": "azure_node_pool", - "type": ".google.cloud.gkemulticloud.v1.AzureNodePool" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "UpdateAzureNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureNodePool", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async", - "title": "AttachedClusters getAzureNodePool Sample", - "origin": "API_DEFINITION", - "description": " Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.", - "canonical": true, - "file": "azure_clusters.get_azure_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAzureNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureNodePool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AzureNodePool", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "GetAzureNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureNodePool", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async", - "title": "AttachedClusters listAzureNodePools Sample", - "origin": "API_DEFINITION", - "description": " Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].", - "canonical": true, - "file": "azure_clusters.list_azure_node_pools.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAzureNodePools", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "ListAzureNodePools", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async", - "title": "AttachedClusters deleteAzureNodePool Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", - "canonical": true, - "file": "azure_clusters.delete_azure_node_pool.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAzureNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureNodePool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "DeleteAzureNodePool", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureNodePool", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - }, - { - "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async", - "title": "AttachedClusters getAzureServerConfig Sample", - "origin": "API_DEFINITION", - "description": " Returns information, such as supported Azure regions and Kubernetes versions, on a given Google Cloud location.", - "canonical": true, - "file": "azure_clusters.get_azure_server_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAzureServerConfig", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.gkemulticloud.v1.AzureServerConfig", - "client": { - "shortName": "AzureClustersClient", - "fullName": "google.cloud.gkemulticloud.v1.AzureClustersClient" - }, - "method": { - "shortName": "GetAzureServerConfig", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig", - "service": { - "shortName": "AzureClusters", - "fullName": "google.cloud.gkemulticloud.v1.AzureClusters" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/index.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/index.ts deleted file mode 100644 index 249caeb9678..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; -const AttachedClustersClient = v1.AttachedClustersClient; -type AttachedClustersClient = v1.AttachedClustersClient; -const AwsClustersClient = v1.AwsClustersClient; -type AwsClustersClient = v1.AwsClustersClient; -const AzureClustersClient = v1.AzureClustersClient; -type AzureClustersClient = v1.AzureClustersClient; -export {v1, AttachedClustersClient, AwsClustersClient, AzureClustersClient}; -export default {v1, AttachedClustersClient, AwsClustersClient, AzureClustersClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client.ts deleted file mode 100644 index c8c5d51c62d..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client.ts +++ /dev/null @@ -1,2024 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -/** - * Client JSON configuration object, loaded from - * `src/v1/attached_clusters_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './attached_clusters_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The AttachedClusters API provides a single centrally managed service - * to register and manage Anthos attached clusters that run on customer's owned - * infrastructure. - * @class - * @memberof v1 - */ -export class AttachedClustersClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - attachedClustersStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of AttachedClustersClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new AttachedClustersClient({fallback: 'rest'}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof AttachedClustersClient; - const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest' ) { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - attachedClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' - ), - attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/attachedServerConfig' - ), - awsClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' - ), - awsNodePoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}' - ), - awsServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsServerConfig' - ), - azureClientPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClients/{azure_client}' - ), - azureClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}' - ), - azureNodePoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}' - ), - azureServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureServerConfig' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - }; - - // 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 = { - listAttachedClusters: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'attachedClusters') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback === 'rest') { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=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 createAttachedClusterResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AttachedCluster') as gax.protobuf.Type; - const createAttachedClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const updateAttachedClusterResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AttachedCluster') as gax.protobuf.Type; - const updateAttachedClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const importAttachedClusterResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AttachedCluster') as gax.protobuf.Type; - const importAttachedClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAttachedClusterResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAttachedClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createAttachedCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAttachedClusterResponse.decode.bind(createAttachedClusterResponse), - createAttachedClusterMetadata.decode.bind(createAttachedClusterMetadata)), - updateAttachedCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAttachedClusterResponse.decode.bind(updateAttachedClusterResponse), - updateAttachedClusterMetadata.decode.bind(updateAttachedClusterMetadata)), - importAttachedCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - importAttachedClusterResponse.decode.bind(importAttachedClusterResponse), - importAttachedClusterMetadata.decode.bind(importAttachedClusterMetadata)), - deleteAttachedCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAttachedClusterResponse.decode.bind(deleteAttachedClusterResponse), - deleteAttachedClusterMetadata.decode.bind(deleteAttachedClusterMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.gkemulticloud.v1.AttachedClusters', 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.attachedClustersStub) { - return this.attachedClustersStub; - } - - // Put together the "service stub" for - // google.cloud.gkemulticloud.v1.AttachedClusters. - this.attachedClustersStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.gkemulticloud.v1.AttachedClusters') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.gkemulticloud.v1.AttachedClusters, - 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 attachedClustersStubMethods = - ['createAttachedCluster', 'updateAttachedCluster', 'importAttachedCluster', 'getAttachedCluster', 'listAttachedClusters', 'deleteAttachedCluster', 'getAttachedServerConfig', 'generateAttachedClusterInstallManifest']; - for (const methodName of attachedClustersStubMethods) { - const callPromise = this.attachedClustersStub.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.attachedClustersStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'gkemulticloud.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 'gkemulticloud.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 -- - // ------------------- -/** - * Describes a specific - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * to describe. - * - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.get_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async - */ - getAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAttachedCluster, - protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|undefined, {}|undefined - ]>; - getAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAttachedCluster, - protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|null|undefined, - {}|null|undefined>): void; - getAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAttachedCluster, - protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|null|undefined, - {}|null|undefined>): void; - getAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAttachedCluster, - protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAttachedCluster, - protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAttachedCluster, - protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest|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.getAttachedCluster(request, options, callback); - } -/** - * Returns information, such as supported Kubernetes versions, on a given - * Google Cloud location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AttachedServerConfig|AttachedServerConfig} - * resource to describe. - * - * `AttachedServerConfig` names are formatted as - * `projects//locations//attachedServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AttachedServerConfig]{@link google.cloud.gkemulticloud.v1.AttachedServerConfig}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.get_attached_server_config.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async - */ - getAttachedServerConfig( - request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|undefined, {}|undefined - ]>; - getAttachedServerConfig( - request: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getAttachedServerConfig( - request: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getAttachedServerConfig( - request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest|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.getAttachedServerConfig(request, options, callback); - } -/** - * Generates the install manifest to be installed on the target cluster. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location where this - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {string} request.attachedClusterId - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. - * - * When generating an install manifest for importing an existing Membership - * resource, the attached_cluster_id field must be the Membership id. - * - * Membership names are formatted as `resource name formatted as - * `projects//locations//memberships/`. - * @param {string} request.platformVersion - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * {@link google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig|GetAttachedServerConfig}. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [GenerateAttachedClusterInstallManifestResponse]{@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async - */ - generateAttachedClusterInstallManifest( - request?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|undefined, {}|undefined - ]>; - generateAttachedClusterInstallManifest( - request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|null|undefined, - {}|null|undefined>): void; - generateAttachedClusterInstallManifest( - request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|null|undefined, - {}|null|undefined>): void; - generateAttachedClusterInstallManifest( - request?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest|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.generateAttachedClusterInstallManifest(request, options, callback); - } - -/** - * Creates a new - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * on a given GCP project and region. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location where this - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {google.cloud.gkemulticloud.v1.AttachedCluster} request.attachedCluster - * Required. The specification of the - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} to create. - * @param {string} request.attachedClusterId - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * name formatted as - * `projects//locations//attachedClusters/`. - * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually create the cluster. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.create_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async - */ - createAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, - 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.createAttachedCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAttachedCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.create_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async - */ - async checkCreateAttachedClusterProgress(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.createAttachedCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.gkemulticloud.v1.AttachedCluster} request.attachedCluster - * Required. The - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * to update. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually update the cluster. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}: - * - * * `description`. - * * `annotations`. - * * `platform_version`. - * * `authorization.admin_users`. - * * `logging_config.component_config.enable_components`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.update_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async - */ - updateAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, - 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({ - 'attached_cluster.name': request.attachedCluster!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateAttachedCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateAttachedCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.update_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async - */ - async checkUpdateAttachedClusterProgress(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.updateAttachedCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Imports creates a new - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * by importing an existing Fleet Membership resource. - * - * Attached Clusters created before the introduction of the Anthos Multi-Cloud - * API can be imported through this method. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location where this - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually import the cluster. - * @param {string} request.fleetMembership - * Required. The name of the fleet membership resource to import. - * @param {string} request.platformVersion - * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). - * - * You can list all supported versions on a given Google Cloud region by - * calling - * {@link google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig|GetAttachedServerConfig}. - * @param {string} request.distribution - * Required. The Kubernetes distribution of the underlying attached cluster. - * - * Supported values: ["eks", "aks"]. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.import_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async - */ - importAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - importAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - importAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, - 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.importAttachedCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `importAttachedCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.import_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async - */ - async checkImportAttachedClusterProgress(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.importAttachedCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name the - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} to delete. - * - * `AttachedCluster` names are formatted as - * `projects//locations//attachedClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually delete the resource. - * @param {boolean} request.allowMissing - * If set to true, and the - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * is not found, the request will succeed but no action will be taken on the - * server and a completed {@link google.longrunning.Operation|Operation} will be - * returned. - * - * Useful for idempotent deletion. - * @param {boolean} request.ignoreErrors - * If set to true, the deletion of - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource - * will succeed even if errors occur during deleting in cluster resources. - * Using this parameter may result in orphaned resources in the cluster. - * @param {string} request.etag - * The current etag of the - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.delete_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async - */ - deleteAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAttachedCluster( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAttachedCluster( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, - 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.deleteAttachedCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAttachedCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.delete_attached_cluster.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async - */ - async checkDeleteAttachedClusterProgress(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.deleteAttachedCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} - * resources on a given Google Cloud project and region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. - * 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 `listAttachedClustersAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAttachedClusters( - request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAttachedCluster[], - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse - ]>; - listAttachedClusters( - request: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAttachedCluster>): void; - listAttachedClusters( - request: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAttachedCluster>): void; - listAttachedClusters( - request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAttachedCluster>, - callback?: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAttachedCluster>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAttachedCluster[], - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - 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.listAttachedClusters(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 location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster} 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 `listAttachedClustersAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAttachedClustersStream( - request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - 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['listAttachedClusters']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAttachedClusters.createStream( - this.innerApiCalls.listAttachedClusters as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAttachedClusters`, 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 location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/attached_clusters.list_attached_clusters.js - * region_tag:gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async - */ - listAttachedClustersAsync( - request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, - 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['listAttachedClusters']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAttachedClusters.asyncIterate( - this.innerApiCalls['listAttachedClusters'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 - * [google.longrunning.Operation]{@link - * external:"google.longrunning.Operation"}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * [google.longrunning.Operation]{@link - * external:"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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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. - * - * @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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} attached_cluster - * @returns {string} Resource name string. - */ - attachedClusterPath(project:string,location:string,attachedCluster:string) { - return this.pathTemplates.attachedClusterPathTemplate.render({ - project: project, - location: location, - attached_cluster: attachedCluster, - }); - } - - /** - * Parse the project from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).project; - } - - /** - * Parse the location from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).location; - } - - /** - * Parse the attached_cluster from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the attached_cluster. - */ - matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).attached_cluster; - } - - /** - * Return a fully-qualified attachedServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - attachedServerConfigPath(project:string,location:string) { - return this.pathTemplates.attachedServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AttachedServerConfig resource. - * - * @param {string} attachedServerConfigName - * A fully-qualified path representing AttachedServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { - return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).project; - } - - /** - * Parse the location from AttachedServerConfig resource. - * - * @param {string} attachedServerConfigName - * A fully-qualified path representing AttachedServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { - return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).location; - } - - /** - * Return a fully-qualified awsCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aws_cluster - * @returns {string} Resource name string. - */ - awsClusterPath(project:string,location:string,awsCluster:string) { - return this.pathTemplates.awsClusterPathTemplate.render({ - project: project, - location: location, - aws_cluster: awsCluster, - }); - } - - /** - * Parse the project from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).project; - } - - /** - * Parse the location from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).location; - } - - /** - * Parse the aws_cluster from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the aws_cluster. - */ - matchAwsClusterFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).aws_cluster; - } - - /** - * Return a fully-qualified awsNodePool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aws_cluster - * @param {string} aws_node_pool - * @returns {string} Resource name string. - */ - awsNodePoolPath(project:string,location:string,awsCluster:string,awsNodePool:string) { - return this.pathTemplates.awsNodePoolPathTemplate.render({ - project: project, - location: location, - aws_cluster: awsCluster, - aws_node_pool: awsNodePool, - }); - } - - /** - * Parse the project from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).project; - } - - /** - * Parse the location from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).location; - } - - /** - * Parse the aws_cluster from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the aws_cluster. - */ - matchAwsClusterFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_cluster; - } - - /** - * Parse the aws_node_pool from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the aws_node_pool. - */ - matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_node_pool; - } - - /** - * Return a fully-qualified awsServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - awsServerConfigPath(project:string,location:string) { - return this.pathTemplates.awsServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AwsServerConfig resource. - * - * @param {string} awsServerConfigName - * A fully-qualified path representing AwsServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsServerConfigName(awsServerConfigName: string) { - return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).project; - } - - /** - * Parse the location from AwsServerConfig resource. - * - * @param {string} awsServerConfigName - * A fully-qualified path representing AwsServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsServerConfigName(awsServerConfigName: string) { - return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).location; - } - - /** - * Return a fully-qualified azureClient resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_client - * @returns {string} Resource name string. - */ - azureClientPath(project:string,location:string,azureClient:string) { - return this.pathTemplates.azureClientPathTemplate.render({ - project: project, - location: location, - azure_client: azureClient, - }); - } - - /** - * Parse the project from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).project; - } - - /** - * Parse the location from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).location; - } - - /** - * Parse the azure_client from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the azure_client. - */ - matchAzureClientFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).azure_client; - } - - /** - * Return a fully-qualified azureCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_cluster - * @returns {string} Resource name string. - */ - azureClusterPath(project:string,location:string,azureCluster:string) { - return this.pathTemplates.azureClusterPathTemplate.render({ - project: project, - location: location, - azure_cluster: azureCluster, - }); - } - - /** - * Parse the project from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).project; - } - - /** - * Parse the location from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).location; - } - - /** - * Parse the azure_cluster from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the azure_cluster. - */ - matchAzureClusterFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).azure_cluster; - } - - /** - * Return a fully-qualified azureNodePool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_cluster - * @param {string} azure_node_pool - * @returns {string} Resource name string. - */ - azureNodePoolPath(project:string,location:string,azureCluster:string,azureNodePool:string) { - return this.pathTemplates.azureNodePoolPathTemplate.render({ - project: project, - location: location, - azure_cluster: azureCluster, - azure_node_pool: azureNodePool, - }); - } - - /** - * Parse the project from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).project; - } - - /** - * Parse the location from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).location; - } - - /** - * Parse the azure_cluster from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the azure_cluster. - */ - matchAzureClusterFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_cluster; - } - - /** - * Parse the azure_node_pool from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the azure_node_pool. - */ - matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_node_pool; - } - - /** - * Return a fully-qualified azureServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - azureServerConfigPath(project:string,location:string) { - return this.pathTemplates.azureServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AzureServerConfig resource. - * - * @param {string} azureServerConfigName - * A fully-qualified path representing AzureServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureServerConfigName(azureServerConfigName: string) { - return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).project; - } - - /** - * Parse the location from AzureServerConfig resource. - * - * @param {string} azureServerConfigName - * A fully-qualified path representing AzureServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureServerConfigName(azureServerConfigName: string) { - return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).location; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project:string,location:string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * 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.attachedClustersStub && !this._terminated) { - return this.attachedClustersStub.then(stub => { - this._terminated = true; - stub.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client.ts deleted file mode 100644 index 85da6c6185f..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client.ts +++ /dev/null @@ -1,2571 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -/** - * Client JSON configuration object, loaded from - * `src/v1/aws_clusters_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './aws_clusters_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The AwsClusters API provides a single centrally managed service - * to create and manage Anthos clusters that run on AWS infrastructure. - * @class - * @memberof v1 - */ -export class AwsClustersClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - awsClustersStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of AwsClustersClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new AwsClustersClient({fallback: 'rest'}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof AwsClustersClient; - const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest' ) { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - attachedClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' - ), - attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/attachedServerConfig' - ), - awsClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' - ), - awsNodePoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}' - ), - awsServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsServerConfig' - ), - azureClientPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClients/{azure_client}' - ), - azureClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}' - ), - azureNodePoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}' - ), - azureServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureServerConfig' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - }; - - // 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 = { - listAwsClusters: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'awsClusters'), - listAwsNodePools: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'awsNodePools') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback === 'rest') { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=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 createAwsClusterResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AwsCluster') as gax.protobuf.Type; - const createAwsClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const updateAwsClusterResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AwsCluster') as gax.protobuf.Type; - const updateAwsClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAwsClusterResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAwsClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const createAwsNodePoolResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AwsNodePool') as gax.protobuf.Type; - const createAwsNodePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const updateAwsNodePoolResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AwsNodePool') as gax.protobuf.Type; - const updateAwsNodePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAwsNodePoolResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAwsNodePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createAwsCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAwsClusterResponse.decode.bind(createAwsClusterResponse), - createAwsClusterMetadata.decode.bind(createAwsClusterMetadata)), - updateAwsCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAwsClusterResponse.decode.bind(updateAwsClusterResponse), - updateAwsClusterMetadata.decode.bind(updateAwsClusterMetadata)), - deleteAwsCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAwsClusterResponse.decode.bind(deleteAwsClusterResponse), - deleteAwsClusterMetadata.decode.bind(deleteAwsClusterMetadata)), - createAwsNodePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAwsNodePoolResponse.decode.bind(createAwsNodePoolResponse), - createAwsNodePoolMetadata.decode.bind(createAwsNodePoolMetadata)), - updateAwsNodePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAwsNodePoolResponse.decode.bind(updateAwsNodePoolResponse), - updateAwsNodePoolMetadata.decode.bind(updateAwsNodePoolMetadata)), - deleteAwsNodePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAwsNodePoolResponse.decode.bind(deleteAwsNodePoolResponse), - deleteAwsNodePoolMetadata.decode.bind(deleteAwsNodePoolMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.gkemulticloud.v1.AwsClusters', 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.awsClustersStub) { - return this.awsClustersStub; - } - - // Put together the "service stub" for - // google.cloud.gkemulticloud.v1.AwsClusters. - this.awsClustersStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.gkemulticloud.v1.AwsClusters') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.gkemulticloud.v1.AwsClusters, - 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 awsClustersStubMethods = - ['createAwsCluster', 'updateAwsCluster', 'getAwsCluster', 'listAwsClusters', 'deleteAwsCluster', 'generateAwsAccessToken', 'createAwsNodePool', 'updateAwsNodePool', 'getAwsNodePool', 'listAwsNodePools', 'deleteAwsNodePool', 'getAwsServerConfig']; - for (const methodName of awsClustersStubMethods) { - const callPromise = this.awsClustersStub.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.awsClustersStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'gkemulticloud.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 'gkemulticloud.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 -- - // ------------------- -/** - * Describes a specific {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} - * resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to - * describe. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AwsCluster]{@link google.cloud.gkemulticloud.v1.AwsCluster}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.get_aws_cluster.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async - */ - getAwsCluster( - request?: protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsCluster, - protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|undefined, {}|undefined - ]>; - getAwsCluster( - request: protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsCluster, - protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|null|undefined, - {}|null|undefined>): void; - getAwsCluster( - request: protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsCluster, - protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|null|undefined, - {}|null|undefined>): void; - getAwsCluster( - request?: protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAwsCluster, - protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsCluster, - protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsCluster, - protos.google.cloud.gkemulticloud.v1.IGetAwsClusterRequest|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.getAwsCluster(request, options, callback); - } -/** - * Generates a short-lived access token to authenticate to a given - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.awsCluster - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to - * authenticate to. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [GenerateAwsAccessTokenResponse]{@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.generate_aws_access_token.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async - */ - generateAwsAccessToken( - request?: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|undefined, {}|undefined - ]>; - generateAwsAccessToken( - request: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|null|undefined, - {}|null|undefined>): void; - generateAwsAccessToken( - request: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|null|undefined, - {}|null|undefined>): void; - generateAwsAccessToken( - request?: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest|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({ - 'aws_cluster': request.awsCluster ?? '', - }); - this.initialize(); - return this.innerApiCalls.generateAwsAccessToken(request, options, callback); - } -/** - * Describes a specific - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource to - * describe. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AwsNodePool]{@link google.cloud.gkemulticloud.v1.AwsNodePool}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.get_aws_node_pool.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async - */ - getAwsNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|undefined, {}|undefined - ]>; - getAwsNodePool( - request: protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|null|undefined, - {}|null|undefined>): void; - getAwsNodePool( - request: protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|null|undefined, - {}|null|undefined>): void; - getAwsNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAwsNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest|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.getAwsNodePool(request, options, callback); - } -/** - * Returns information, such as supported AWS regions and Kubernetes - * versions, on a given Google Cloud location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AwsServerConfig|AwsServerConfig} resource - * to describe. - * - * `AwsServerConfig` names are formatted as - * `projects//locations//awsServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AwsServerConfig]{@link google.cloud.gkemulticloud.v1.AwsServerConfig}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.get_aws_server_config.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async - */ - getAwsServerConfig( - request?: protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|undefined, {}|undefined - ]>; - getAwsServerConfig( - request: protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getAwsServerConfig( - request: protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getAwsServerConfig( - request?: protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest|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.getAwsServerConfig(request, options, callback); - } - -/** - * Creates a new {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} - * resource on a given GCP project and region. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location where this - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {google.cloud.gkemulticloud.v1.AwsCluster} request.awsCluster - * Required. The specification of the - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} to create. - * @param {string} request.awsClusterId - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource name - * formatted as - * `projects//locations//awsClusters/`. - * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually create the cluster. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.create_aws_cluster.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async - */ - createAwsCluster( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAwsCluster( - request: protos.google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAwsCluster( - request: protos.google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAwsCluster( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest, - 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.createAwsCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAwsCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.create_aws_cluster.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async - */ - async checkCreateAwsClusterProgress(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.createAwsCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.gkemulticloud.v1.AwsCluster} request.awsCluster - * Required. The {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} - * resource to update. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually update the cluster. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}: - * - * * `description`. - * * `annotations`. - * * `control_plane.version`. - * * `authorization.admin_users`. - * * `control_plane.aws_services_authentication.role_arn`. - * * `control_plane.aws_services_authentication.role_session_name`. - * * `control_plane.config_encryption.kms_key_arn`. - * * `control_plane.instance_type`. - * * `control_plane.security_group_ids`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.secret_arn`. - * * `control_plane.proxy_config.secret_version`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.iops`. - * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.ssh_config`. - * * `control_plane.ssh_config.ec2_key_pair`. - * * `control_plane.instance_placement.tenancy`. - * * `control_plane.iam_instance_profile`. - * * `logging_config.component_config.enable_components`. - * * `control_plane.tags`. - * * `monitoring_config.managed_prometheus_config.enabled`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.update_aws_cluster.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async - */ - updateAwsCluster( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAwsCluster( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAwsCluster( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAwsCluster( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest, - 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({ - 'aws_cluster.name': request.awsCluster!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateAwsCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateAwsCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.update_aws_cluster.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async - */ - async checkUpdateAwsClusterProgress(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.updateAwsCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} - * resource. - * - * Fails if the cluster has one or more associated - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name the - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} to delete. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually delete the resource. - * @param {boolean} request.allowMissing - * If set to true, and the - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed {@link google.longrunning.Operation|Operation} will be returned. - * - * Useful for idempotent deletion. - * @param {string} request.etag - * The current etag of the - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.delete_aws_cluster.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async - */ - deleteAwsCluster( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAwsCluster( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAwsCluster( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAwsCluster( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest, - 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.deleteAwsCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAwsCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.delete_aws_cluster.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async - */ - async checkDeleteAwsClusterProgress(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.deleteAwsCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}, - * attached to a given {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} - * resource where this node pool will be created. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {google.cloud.gkemulticloud.v1.AwsNodePool} request.awsNodePool - * Required. The specification of the - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} to create. - * @param {string} request.awsNodePoolId - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource name - * formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually create the node - * pool. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.create_aws_node_pool.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async - */ - createAwsNodePool( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAwsNodePool( - request: protos.google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAwsNodePool( - request: protos.google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAwsNodePool( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest, - 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.createAwsNodePool(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAwsNodePool()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.create_aws_node_pool.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async - */ - async checkCreateAwsNodePoolProgress(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.createAwsNodePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.gkemulticloud.v1.AwsNodePool} request.awsNodePool - * Required. The {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} - * resource to update. - * @param {boolean} request.validateOnly - * If set, only validate the request, but don't actually update the node pool. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}: - * - * * `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.config_encryption.kms_key_arn`. - * * `config.security_group_ids`. - * * `config.root_volume.iops`. - * * `config.root_volume.kms_key_arn`. - * * `config.root_volume.volume_type`. - * * `config.root_volume.size_gib`. - * * `config.proxy_config`. - * * `config.proxy_config.secret_arn`. - * * `config.proxy_config.secret_version`. - * * `config.ssh_config`. - * * `config.ssh_config.ec2_key_pair`. - * * `config.instance_placement.tenancy`. - * * `config.iam_instance_profile`. - * * `config.labels`. - * * `config.tags`. - * * `config.autoscaling_metrics_collection`. - * * `config.autoscaling_metrics_collection.granularity`. - * * `config.autoscaling_metrics_collection.metrics`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.update_aws_node_pool.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async - */ - updateAwsNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAwsNodePool( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAwsNodePool( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAwsNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest, - 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({ - 'aws_node_pool.name': request.awsNodePool!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateAwsNodePool(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateAwsNodePool()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.update_aws_node_pool.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async - */ - async checkUpdateAwsNodePoolProgress(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.updateAwsNodePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} - * resource. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name the - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} to delete. - * - * `AwsNodePool` names are formatted as - * `projects//locations//awsClusters//awsNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually delete the node - * pool. - * @param {boolean} request.allowMissing - * If set to true, and the - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed {@link google.longrunning.Operation|Operation} will be returned. - * - * Useful for idempotent deletion. - * @param {string} request.etag - * The current ETag of the - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.delete_aws_node_pool.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async - */ - deleteAwsNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAwsNodePool( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAwsNodePool( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAwsNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest, - 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.deleteAwsNodePool(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAwsNodePool()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.delete_aws_node_pool.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async - */ - async checkDeleteAwsNodePoolProgress(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.deleteAwsNodePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources - * on a given Google Cloud project and region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [AwsCluster]{@link google.cloud.gkemulticloud.v1.AwsCluster}. - * 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 `listAwsClustersAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAwsClusters( - request?: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsCluster[], - protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse - ]>; - listAwsClusters( - request: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAwsCluster>): void; - listAwsClusters( - request: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAwsCluster>): void; - listAwsClusters( - request?: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAwsCluster>, - callback?: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAwsCluster>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsCluster[], - protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAwsClustersResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - 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.listAwsClusters(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 location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing [AwsCluster]{@link google.cloud.gkemulticloud.v1.AwsCluster} 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 `listAwsClustersAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAwsClustersStream( - request?: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - 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['listAwsClusters']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAwsClusters.createStream( - this.innerApiCalls.listAwsClusters as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAwsClusters`, 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 location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [AwsCluster]{@link google.cloud.gkemulticloud.v1.AwsCluster}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.list_aws_clusters.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async - */ - listAwsClustersAsync( - request?: protos.google.cloud.gkemulticloud.v1.IListAwsClustersRequest, - 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['listAwsClusters']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAwsClusters.asyncIterate( - this.innerApiCalls['listAwsClusters'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} - * resources on a given - * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent `AwsCluster` which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [AwsNodePool]{@link google.cloud.gkemulticloud.v1.AwsNodePool}. - * 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 `listAwsNodePoolsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAwsNodePools( - request?: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsNodePool[], - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse - ]>; - listAwsNodePools( - request: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAwsNodePool>): void; - listAwsNodePools( - request: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAwsNodePool>): void; - listAwsNodePools( - request?: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAwsNodePool>, - callback?: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAwsNodePool>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAwsNodePool[], - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - 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.listAwsNodePools(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 `AwsCluster` which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing [AwsNodePool]{@link google.cloud.gkemulticloud.v1.AwsNodePool} 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 `listAwsNodePoolsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAwsNodePoolsStream( - request?: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - 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['listAwsNodePools']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAwsNodePools.createStream( - this.innerApiCalls.listAwsNodePools as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAwsNodePools`, 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 `AwsCluster` which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. - * - * `AwsCluster` names are formatted as - * `projects//locations//awsClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [AwsNodePool]{@link google.cloud.gkemulticloud.v1.AwsNodePool}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/aws_clusters.list_aws_node_pools.js - * region_tag:gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async - */ - listAwsNodePoolsAsync( - request?: protos.google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest, - 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['listAwsNodePools']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAwsNodePools.asyncIterate( - this.innerApiCalls['listAwsNodePools'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 - * [google.longrunning.Operation]{@link - * external:"google.longrunning.Operation"}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * [google.longrunning.Operation]{@link - * external:"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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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. - * - * @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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} attached_cluster - * @returns {string} Resource name string. - */ - attachedClusterPath(project:string,location:string,attachedCluster:string) { - return this.pathTemplates.attachedClusterPathTemplate.render({ - project: project, - location: location, - attached_cluster: attachedCluster, - }); - } - - /** - * Parse the project from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).project; - } - - /** - * Parse the location from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).location; - } - - /** - * Parse the attached_cluster from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the attached_cluster. - */ - matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).attached_cluster; - } - - /** - * Return a fully-qualified attachedServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - attachedServerConfigPath(project:string,location:string) { - return this.pathTemplates.attachedServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AttachedServerConfig resource. - * - * @param {string} attachedServerConfigName - * A fully-qualified path representing AttachedServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { - return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).project; - } - - /** - * Parse the location from AttachedServerConfig resource. - * - * @param {string} attachedServerConfigName - * A fully-qualified path representing AttachedServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { - return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).location; - } - - /** - * Return a fully-qualified awsCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aws_cluster - * @returns {string} Resource name string. - */ - awsClusterPath(project:string,location:string,awsCluster:string) { - return this.pathTemplates.awsClusterPathTemplate.render({ - project: project, - location: location, - aws_cluster: awsCluster, - }); - } - - /** - * Parse the project from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).project; - } - - /** - * Parse the location from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).location; - } - - /** - * Parse the aws_cluster from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the aws_cluster. - */ - matchAwsClusterFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).aws_cluster; - } - - /** - * Return a fully-qualified awsNodePool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aws_cluster - * @param {string} aws_node_pool - * @returns {string} Resource name string. - */ - awsNodePoolPath(project:string,location:string,awsCluster:string,awsNodePool:string) { - return this.pathTemplates.awsNodePoolPathTemplate.render({ - project: project, - location: location, - aws_cluster: awsCluster, - aws_node_pool: awsNodePool, - }); - } - - /** - * Parse the project from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).project; - } - - /** - * Parse the location from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).location; - } - - /** - * Parse the aws_cluster from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the aws_cluster. - */ - matchAwsClusterFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_cluster; - } - - /** - * Parse the aws_node_pool from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the aws_node_pool. - */ - matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_node_pool; - } - - /** - * Return a fully-qualified awsServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - awsServerConfigPath(project:string,location:string) { - return this.pathTemplates.awsServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AwsServerConfig resource. - * - * @param {string} awsServerConfigName - * A fully-qualified path representing AwsServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsServerConfigName(awsServerConfigName: string) { - return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).project; - } - - /** - * Parse the location from AwsServerConfig resource. - * - * @param {string} awsServerConfigName - * A fully-qualified path representing AwsServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsServerConfigName(awsServerConfigName: string) { - return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).location; - } - - /** - * Return a fully-qualified azureClient resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_client - * @returns {string} Resource name string. - */ - azureClientPath(project:string,location:string,azureClient:string) { - return this.pathTemplates.azureClientPathTemplate.render({ - project: project, - location: location, - azure_client: azureClient, - }); - } - - /** - * Parse the project from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).project; - } - - /** - * Parse the location from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).location; - } - - /** - * Parse the azure_client from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the azure_client. - */ - matchAzureClientFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).azure_client; - } - - /** - * Return a fully-qualified azureCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_cluster - * @returns {string} Resource name string. - */ - azureClusterPath(project:string,location:string,azureCluster:string) { - return this.pathTemplates.azureClusterPathTemplate.render({ - project: project, - location: location, - azure_cluster: azureCluster, - }); - } - - /** - * Parse the project from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).project; - } - - /** - * Parse the location from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).location; - } - - /** - * Parse the azure_cluster from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the azure_cluster. - */ - matchAzureClusterFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).azure_cluster; - } - - /** - * Return a fully-qualified azureNodePool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_cluster - * @param {string} azure_node_pool - * @returns {string} Resource name string. - */ - azureNodePoolPath(project:string,location:string,azureCluster:string,azureNodePool:string) { - return this.pathTemplates.azureNodePoolPathTemplate.render({ - project: project, - location: location, - azure_cluster: azureCluster, - azure_node_pool: azureNodePool, - }); - } - - /** - * Parse the project from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).project; - } - - /** - * Parse the location from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).location; - } - - /** - * Parse the azure_cluster from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the azure_cluster. - */ - matchAzureClusterFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_cluster; - } - - /** - * Parse the azure_node_pool from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the azure_node_pool. - */ - matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_node_pool; - } - - /** - * Return a fully-qualified azureServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - azureServerConfigPath(project:string,location:string) { - return this.pathTemplates.azureServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AzureServerConfig resource. - * - * @param {string} azureServerConfigName - * A fully-qualified path representing AzureServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureServerConfigName(azureServerConfigName: string) { - return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).project; - } - - /** - * Parse the location from AzureServerConfig resource. - * - * @param {string} azureServerConfigName - * A fully-qualified path representing AzureServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureServerConfigName(azureServerConfigName: string) { - return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).location; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project:string,location:string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * 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.awsClustersStub && !this._terminated) { - return this.awsClustersStub.then(stub => { - this._terminated = true; - stub.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client_config.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client_config.json deleted file mode 100644 index 714cb1ace74..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_client_config.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkemulticloud.v1.AwsClusters": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListAwsClusters": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteAwsCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GenerateAwsAccessToken": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListAwsNodePools": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteAwsNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAwsServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_proto_list.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_proto_list.json deleted file mode 100644 index 288ec0e3d51..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/aws_clusters_proto_list.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - "../../protos/google/cloud/gkemulticloud/v1/attached_resources.proto", - "../../protos/google/cloud/gkemulticloud/v1/attached_service.proto", - "../../protos/google/cloud/gkemulticloud/v1/aws_resources.proto", - "../../protos/google/cloud/gkemulticloud/v1/aws_service.proto", - "../../protos/google/cloud/gkemulticloud/v1/azure_resources.proto", - "../../protos/google/cloud/gkemulticloud/v1/azure_service.proto", - "../../protos/google/cloud/gkemulticloud/v1/common_resources.proto" -] diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client.ts deleted file mode 100644 index 14c1a1c2686..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client.ts +++ /dev/null @@ -1,3098 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -/** - * Client JSON configuration object, loaded from - * `src/v1/azure_clusters_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './azure_clusters_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The AzureClusters API provides a single centrally managed service - * to create and manage Anthos clusters that run on Azure infrastructure. - * @class - * @memberof v1 - */ -export class AzureClustersClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - azureClustersStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of AzureClustersClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new AzureClustersClient({fallback: 'rest'}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof AzureClustersClient; - const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else if (opts.fallback === 'rest' ) { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - attachedClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' - ), - attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/attachedServerConfig' - ), - awsClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' - ), - awsNodePoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}' - ), - awsServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/awsServerConfig' - ), - azureClientPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClients/{azure_client}' - ), - azureClusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}' - ), - azureNodePoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}' - ), - azureServerConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/azureServerConfig' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - }; - - // 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 = { - listAzureClients: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'azureClients'), - listAzureClusters: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'azureClusters'), - listAzureNodePools: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'azureNodePools') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a - // an Operation object that allows for tracking of the operation, - // rather than holding a request open. - const lroOptions: GrpcClientOptions = { - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined - }; - if (opts.fallback === 'rest') { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=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 createAzureClientResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AzureClient') as gax.protobuf.Type; - const createAzureClientMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAzureClientResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAzureClientMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const createAzureClusterResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AzureCluster') as gax.protobuf.Type; - const createAzureClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const updateAzureClusterResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AzureCluster') as gax.protobuf.Type; - const updateAzureClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAzureClusterResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAzureClusterMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const createAzureNodePoolResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AzureNodePool') as gax.protobuf.Type; - const createAzureNodePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const updateAzureNodePoolResponse = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.AzureNodePool') as gax.protobuf.Type; - const updateAzureNodePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAzureNodePoolResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAzureNodePoolMetadata = protoFilesRoot.lookup( - '.google.cloud.gkemulticloud.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createAzureClient: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAzureClientResponse.decode.bind(createAzureClientResponse), - createAzureClientMetadata.decode.bind(createAzureClientMetadata)), - deleteAzureClient: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAzureClientResponse.decode.bind(deleteAzureClientResponse), - deleteAzureClientMetadata.decode.bind(deleteAzureClientMetadata)), - createAzureCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAzureClusterResponse.decode.bind(createAzureClusterResponse), - createAzureClusterMetadata.decode.bind(createAzureClusterMetadata)), - updateAzureCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAzureClusterResponse.decode.bind(updateAzureClusterResponse), - updateAzureClusterMetadata.decode.bind(updateAzureClusterMetadata)), - deleteAzureCluster: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAzureClusterResponse.decode.bind(deleteAzureClusterResponse), - deleteAzureClusterMetadata.decode.bind(deleteAzureClusterMetadata)), - createAzureNodePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAzureNodePoolResponse.decode.bind(createAzureNodePoolResponse), - createAzureNodePoolMetadata.decode.bind(createAzureNodePoolMetadata)), - updateAzureNodePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAzureNodePoolResponse.decode.bind(updateAzureNodePoolResponse), - updateAzureNodePoolMetadata.decode.bind(updateAzureNodePoolMetadata)), - deleteAzureNodePool: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAzureNodePoolResponse.decode.bind(deleteAzureNodePoolResponse), - deleteAzureNodePoolMetadata.decode.bind(deleteAzureNodePoolMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.gkemulticloud.v1.AzureClusters', 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.azureClustersStub) { - return this.azureClustersStub; - } - - // Put together the "service stub" for - // google.cloud.gkemulticloud.v1.AzureClusters. - this.azureClustersStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.gkemulticloud.v1.AzureClusters') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.gkemulticloud.v1.AzureClusters, - 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 azureClustersStubMethods = - ['createAzureClient', 'getAzureClient', 'listAzureClients', 'deleteAzureClient', 'createAzureCluster', 'updateAzureCluster', 'getAzureCluster', 'listAzureClusters', 'deleteAzureCluster', 'generateAzureAccessToken', 'createAzureNodePool', 'updateAzureNodePool', 'getAzureNodePool', 'listAzureNodePools', 'deleteAzureNodePool', 'getAzureServerConfig']; - for (const methodName of azureClustersStubMethods) { - const callPromise = this.azureClustersStub.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.azureClustersStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'gkemulticloud.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 'gkemulticloud.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 -- - // ------------------- -/** - * Describes a specific - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource to - * describe. - * - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} names are - * formatted as - * `projects//locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AzureClient]{@link google.cloud.gkemulticloud.v1.AzureClient}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.get_azure_client.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async - */ - getAzureClient( - request?: protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureClient, - protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|undefined, {}|undefined - ]>; - getAzureClient( - request: protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureClient, - protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|null|undefined, - {}|null|undefined>): void; - getAzureClient( - request: protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureClient, - protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|null|undefined, - {}|null|undefined>): void; - getAzureClient( - request?: protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAzureClient, - protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureClient, - protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureClient, - protos.google.cloud.gkemulticloud.v1.IGetAzureClientRequest|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.getAzureClient(request, options, callback); - } -/** - * Describes a specific - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to - * describe. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AzureCluster]{@link google.cloud.gkemulticloud.v1.AzureCluster}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.get_azure_cluster.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async - */ - getAzureCluster( - request?: protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureCluster, - protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|undefined, {}|undefined - ]>; - getAzureCluster( - request: protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureCluster, - protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|null|undefined, - {}|null|undefined>): void; - getAzureCluster( - request: protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureCluster, - protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|null|undefined, - {}|null|undefined>): void; - getAzureCluster( - request?: protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAzureCluster, - protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureCluster, - protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureCluster, - protos.google.cloud.gkemulticloud.v1.IGetAzureClusterRequest|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.getAzureCluster(request, options, callback); - } -/** - * Generates a short-lived access token to authenticate to a given - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.azureCluster - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to - * authenticate to. - * - * `AzureCluster` names are formatted as - * `projects//locations//AzureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [GenerateAzureAccessTokenResponse]{@link google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.generate_azure_access_token.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async - */ - generateAzureAccessToken( - request?: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|undefined, {}|undefined - ]>; - generateAzureAccessToken( - request: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|null|undefined, - {}|null|undefined>): void; - generateAzureAccessToken( - request: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|null|undefined, - {}|null|undefined>): void; - generateAzureAccessToken( - request?: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse, - protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenRequest|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({ - 'azure_cluster': request.azureCluster ?? '', - }); - this.initialize(); - return this.innerApiCalls.generateAzureAccessToken(request, options, callback); - } -/** - * Describes a specific - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource to - * describe. - * - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AzureNodePool]{@link google.cloud.gkemulticloud.v1.AzureNodePool}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.get_azure_node_pool.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async - */ - getAzureNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|undefined, {}|undefined - ]>; - getAzureNodePool( - request: protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|null|undefined, - {}|null|undefined>): void; - getAzureNodePool( - request: protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|null|undefined, - {}|null|undefined>): void; - getAzureNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAzureNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureNodePool, - protos.google.cloud.gkemulticloud.v1.IGetAzureNodePoolRequest|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.getAzureNodePool(request, options, callback); - } -/** - * Returns information, such as supported Azure regions and Kubernetes - * versions, on a given Google Cloud location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the - * {@link google.cloud.gkemulticloud.v1.AzureServerConfig|AzureServerConfig} - * resource to describe. - * - * `AzureServerConfig` names are formatted as - * `projects//locations//azureServerConfig`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [AzureServerConfig]{@link google.cloud.gkemulticloud.v1.AzureServerConfig}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.get_azure_server_config.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async - */ - getAzureServerConfig( - request?: protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|undefined, {}|undefined - ]>; - getAzureServerConfig( - request: protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getAzureServerConfig( - request: protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest, - callback: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|null|undefined, - {}|null|undefined>): void; - getAzureServerConfig( - request?: protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureServerConfig, - protos.google.cloud.gkemulticloud.v1.IGetAzureServerConfigRequest|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.getAzureServerConfig(request, options, callback); - } - -/** - * Creates a new {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} - * resource on a given Google Cloud project and region. - * - * `AzureClient` resources hold client authentication - * information needed by the Anthos Multicloud API to manage Azure resources - * on your Azure subscription on your behalf. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location where this - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {google.cloud.gkemulticloud.v1.AzureClient} request.azureClient - * Required. The specification of the - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} to create. - * @param {string} request.azureClientId - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource name - * formatted as - * `projects//locations//azureClients/`. - * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually create the client. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.create_azure_client.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async - */ - createAzureClient( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureClientRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAzureClient( - request: protos.google.cloud.gkemulticloud.v1.ICreateAzureClientRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAzureClient( - request: protos.google.cloud.gkemulticloud.v1.ICreateAzureClientRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAzureClient( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureClientRequest, - 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.createAzureClient(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAzureClient()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.create_azure_client.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async - */ - async checkCreateAzureClientProgress(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.createAzureClient, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} - * resource. - * - * If the client is used by one or more clusters, deletion will - * fail and a `FAILED_PRECONDITION` error will be returned. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name the - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} to delete. - * - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} names are - * formatted as - * `projects//locations//azureClients/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {boolean} request.allowMissing - * If set to true, and the - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed {@link google.longrunning.Operation|Operation} will be returned. - * - * Useful for idempotent deletion. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually delete the resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.delete_azure_client.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async - */ - deleteAzureClient( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClientRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAzureClient( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClientRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAzureClient( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClientRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAzureClient( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClientRequest, - 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.deleteAzureClient(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAzureClient()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.delete_azure_client.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async - */ - async checkDeleteAzureClientProgress(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.deleteAzureClient, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} - * resource on a given GCP project and region. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location where this - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource will be - * created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {google.cloud.gkemulticloud.v1.AzureCluster} request.azureCluster - * Required. The specification of the - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} to create. - * @param {string} request.azureClusterId - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource name - * formatted as - * `projects//locations//azureClusters/`. - * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually create the cluster. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.create_azure_cluster.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async - */ - createAzureCluster( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAzureCluster( - request: protos.google.cloud.gkemulticloud.v1.ICreateAzureClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAzureCluster( - request: protos.google.cloud.gkemulticloud.v1.ICreateAzureClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAzureCluster( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureClusterRequest, - 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.createAzureCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAzureCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.create_azure_cluster.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async - */ - async checkCreateAzureClusterProgress(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.createAzureCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.gkemulticloud.v1.AzureCluster} request.azureCluster - * Required. The {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} - * resource to update. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually update the cluster. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}: - * - * * `description`. - * * `azureClient`. - * * `control_plane.version`. - * * `control_plane.vm_size`. - * * `annotations`. - * * `authorization.admin_users`. - * * `control_plane.root_volume.size_gib`. - * * `control_plane.proxy_config`. - * * `control_plane.proxy_config.resource_group_id`. - * * `control_plane.proxy_config.secret_id`. - * * `control_plane.ssh_config.authorized_key`. - * * `logging_config.component_config.enable_components` - * * `monitoring_config.managed_prometheus_config.enabled`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.update_azure_cluster.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async - */ - updateAzureCluster( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAzureClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAzureCluster( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAzureClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAzureCluster( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAzureClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAzureCluster( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAzureClusterRequest, - 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({ - 'azure_cluster.name': request.azureCluster!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateAzureCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateAzureCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.update_azure_cluster.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async - */ - async checkUpdateAzureClusterProgress(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.updateAzureCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. - * - * Fails if the cluster has one or more associated - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name the - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} to delete. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {boolean} request.allowMissing - * If set to true, and the - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource is not - * found, the request will succeed but no action will be taken on the server - * and a completed {@link google.longrunning.Operation|Operation} will be returned. - * - * Useful for idempotent deletion. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually delete the resource. - * @param {string} request.etag - * The current etag of the - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided etag does not match the current etag of the cluster, - * the request will fail and an ABORTED error will be returned. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.delete_azure_cluster.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async - */ - deleteAzureCluster( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClusterRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAzureCluster( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClusterRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAzureCluster( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClusterRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAzureCluster( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureClusterRequest, - 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.deleteAzureCluster(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAzureCluster()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.delete_azure_cluster.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async - */ - async checkDeleteAzureClusterProgress(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.deleteAzureCluster, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}, - * attached to a given - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} - * resource where this node pool will be created. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {google.cloud.gkemulticloud.v1.AzureNodePool} request.azureNodePool - * Required. The specification of the - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} to create. - * @param {string} request.azureNodePoolId - * Required. A client provided ID the resource. Must be unique within the - * parent resource. - * - * The provided ID will be part of the - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource name - * formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually create the node - * pool. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.create_azure_node_pool.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async - */ - createAzureNodePool( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureNodePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAzureNodePool( - request: protos.google.cloud.gkemulticloud.v1.ICreateAzureNodePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAzureNodePool( - request: protos.google.cloud.gkemulticloud.v1.ICreateAzureNodePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAzureNodePool( - request?: protos.google.cloud.gkemulticloud.v1.ICreateAzureNodePoolRequest, - 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.createAzureNodePool(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAzureNodePool()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.create_azure_node_pool.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async - */ - async checkCreateAzureNodePoolProgress(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.createAzureNodePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.gkemulticloud.v1.AzureNodePool} request.azureNodePool - * Required. The {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} - * resource to update. - * @param {boolean} request.validateOnly - * If set, only validate the request, but don't actually update the node pool. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field can only include these - * fields from {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}: - * - * *. `annotations`. - * * `version`. - * * `autoscaling.min_node_count`. - * * `autoscaling.max_node_count`. - * * `config.ssh_config.authorized_key`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.update_azure_node_pool.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async - */ - updateAzureNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAzureNodePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAzureNodePool( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAzureNodePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAzureNodePool( - request: protos.google.cloud.gkemulticloud.v1.IUpdateAzureNodePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAzureNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IUpdateAzureNodePoolRequest, - 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({ - 'azure_node_pool.name': request.azureNodePool!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateAzureNodePool(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateAzureNodePool()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.update_azure_node_pool.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async - */ - async checkUpdateAzureNodePoolProgress(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.updateAzureNodePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource. - * - * If successful, the response contains a newly created - * {@link google.longrunning.Operation|Operation} resource that can be - * described to track the status of the operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name the - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} to delete. - * - * `AzureNodePool` names are formatted as - * `projects//locations//azureClusters//azureNodePools/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {boolean} request.validateOnly - * If set, only validate the request, but do not actually delete the node - * pool. - * @param {boolean} request.allowMissing - * If set to true, and the - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource is - * not found, the request will succeed but no action will be taken on the - * server and a completed {@link google.longrunning.Operation|Operation} will be - * returned. - * - * Useful for idempotent deletion. - * @param {string} request.etag - * The current ETag of the - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}. - * - * Allows clients to perform deletions through optimistic concurrency control. - * - * If the provided ETag does not match the current etag of the node pool, - * the request will fail and an ABORTED error will be returned. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.delete_azure_node_pool.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async - */ - deleteAzureNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureNodePoolRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAzureNodePool( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureNodePoolRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAzureNodePool( - request: protos.google.cloud.gkemulticloud.v1.IDeleteAzureNodePoolRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAzureNodePool( - request?: protos.google.cloud.gkemulticloud.v1.IDeleteAzureNodePoolRequest, - 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.deleteAzureNodePool(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAzureNodePool()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.delete_azure_node_pool.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async - */ - async checkDeleteAzureNodePoolProgress(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.deleteAzureNodePool, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} - * resources on a given Google Cloud project and region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [AzureClient]{@link google.cloud.gkemulticloud.v1.AzureClient}. - * 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 `listAzureClientsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAzureClients( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureClient[], - protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse - ]>; - listAzureClients( - request: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureClient>): void; - listAzureClients( - request: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureClient>): void; - listAzureClients( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureClient>, - callback?: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureClient>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureClient[], - protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAzureClientsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - 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.listAzureClients(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 location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing [AzureClient]{@link google.cloud.gkemulticloud.v1.AzureClient} 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 `listAzureClientsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAzureClientsStream( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - 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['listAzureClients']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAzureClients.createStream( - this.innerApiCalls.listAzureClients as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAzureClients`, 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 location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [AzureClient]{@link google.cloud.gkemulticloud.v1.AzureClient}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.list_azure_clients.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async - */ - listAzureClientsAsync( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureClientsRequest, - 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['listAzureClients']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAzureClients.asyncIterate( - this.innerApiCalls['listAzureClients'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} - * resources on a given Google Cloud project and region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [AzureCluster]{@link google.cloud.gkemulticloud.v1.AzureCluster}. - * 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 `listAzureClustersAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAzureClusters( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureCluster[], - protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse - ]>; - listAzureClusters( - request: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureCluster>): void; - listAzureClusters( - request: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureCluster>): void; - listAzureClusters( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureCluster>, - callback?: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureCluster>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureCluster[], - protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAzureClustersResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - 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.listAzureClusters(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 location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing [AzureCluster]{@link google.cloud.gkemulticloud.v1.AzureCluster} 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 `listAzureClustersAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAzureClustersStream( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - 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['listAzureClusters']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAzureClusters.createStream( - this.innerApiCalls.listAzureClusters as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAzureClusters`, 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 location which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resources. - * - * Location names are formatted as `projects//locations/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on GCP resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [AzureCluster]{@link google.cloud.gkemulticloud.v1.AzureCluster}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.list_azure_clusters.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async - */ - listAzureClustersAsync( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureClustersRequest, - 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['listAzureClusters']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAzureClusters.asyncIterate( - this.innerApiCalls['listAzureClusters'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} - * resources on a given - * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent `AzureCluster` which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [AzureNodePool]{@link google.cloud.gkemulticloud.v1.AzureNodePool}. - * 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 `listAzureNodePoolsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAzureNodePools( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureNodePool[], - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse - ]>; - listAzureNodePools( - request: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureNodePool>): void; - listAzureNodePools( - request: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - callback: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureNodePool>): void; - listAzureNodePools( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureNodePool>, - callback?: PaginationCallback< - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse|null|undefined, - protos.google.cloud.gkemulticloud.v1.IAzureNodePool>): - Promise<[ - protos.google.cloud.gkemulticloud.v1.IAzureNodePool[], - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest|null, - protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - 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.listAzureNodePools(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 `AzureCluster` which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing [AzureNodePool]{@link google.cloud.gkemulticloud.v1.AzureNodePool} 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 `listAzureNodePoolsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listAzureNodePoolsStream( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - 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['listAzureNodePools']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAzureNodePools.createStream( - this.innerApiCalls.listAzureNodePools as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAzureNodePools`, 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 `AzureCluster` which owns this collection of - * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. - * - * `AzureCluster` names are formatted as - * `projects//locations//azureClusters/`. - * - * See [Resource Names](https://cloud.google.com/apis/design/resource_names) - * for more details on Google Cloud resource names. - * @param {number} request.pageSize - * The maximum number of items to return. - * - * If not specified, a default value of 50 will be used by the service. - * Regardless of the pageSize value, the response can include a partial list - * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} - * to determine if there are more instances left to be queried. - * @param {string} request.pageToken - * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} - * request, if any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [AzureNodePool]{@link google.cloud.gkemulticloud.v1.AzureNodePool}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/azure_clusters.list_azure_node_pools.js - * region_tag:gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async - */ - listAzureNodePoolsAsync( - request?: protos.google.cloud.gkemulticloud.v1.IListAzureNodePoolsRequest, - 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['listAzureNodePools']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAzureNodePools.asyncIterate( - this.innerApiCalls['listAzureNodePools'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 - * [google.longrunning.Operation]{@link - * external:"google.longrunning.Operation"}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * [google.longrunning.Operation]{@link - * external:"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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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. - * - * @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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link - * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} attached_cluster - * @returns {string} Resource name string. - */ - attachedClusterPath(project:string,location:string,attachedCluster:string) { - return this.pathTemplates.attachedClusterPathTemplate.render({ - project: project, - location: location, - attached_cluster: attachedCluster, - }); - } - - /** - * Parse the project from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).project; - } - - /** - * Parse the location from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).location; - } - - /** - * Parse the attached_cluster from AttachedCluster resource. - * - * @param {string} attachedClusterName - * A fully-qualified path representing AttachedCluster resource. - * @returns {string} A string representing the attached_cluster. - */ - matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { - return this.pathTemplates.attachedClusterPathTemplate.match(attachedClusterName).attached_cluster; - } - - /** - * Return a fully-qualified attachedServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - attachedServerConfigPath(project:string,location:string) { - return this.pathTemplates.attachedServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AttachedServerConfig resource. - * - * @param {string} attachedServerConfigName - * A fully-qualified path representing AttachedServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { - return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).project; - } - - /** - * Parse the location from AttachedServerConfig resource. - * - * @param {string} attachedServerConfigName - * A fully-qualified path representing AttachedServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { - return this.pathTemplates.attachedServerConfigPathTemplate.match(attachedServerConfigName).location; - } - - /** - * Return a fully-qualified awsCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aws_cluster - * @returns {string} Resource name string. - */ - awsClusterPath(project:string,location:string,awsCluster:string) { - return this.pathTemplates.awsClusterPathTemplate.render({ - project: project, - location: location, - aws_cluster: awsCluster, - }); - } - - /** - * Parse the project from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).project; - } - - /** - * Parse the location from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).location; - } - - /** - * Parse the aws_cluster from AwsCluster resource. - * - * @param {string} awsClusterName - * A fully-qualified path representing AwsCluster resource. - * @returns {string} A string representing the aws_cluster. - */ - matchAwsClusterFromAwsClusterName(awsClusterName: string) { - return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName).aws_cluster; - } - - /** - * Return a fully-qualified awsNodePool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} aws_cluster - * @param {string} aws_node_pool - * @returns {string} Resource name string. - */ - awsNodePoolPath(project:string,location:string,awsCluster:string,awsNodePool:string) { - return this.pathTemplates.awsNodePoolPathTemplate.render({ - project: project, - location: location, - aws_cluster: awsCluster, - aws_node_pool: awsNodePool, - }); - } - - /** - * Parse the project from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).project; - } - - /** - * Parse the location from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).location; - } - - /** - * Parse the aws_cluster from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the aws_cluster. - */ - matchAwsClusterFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_cluster; - } - - /** - * Parse the aws_node_pool from AwsNodePool resource. - * - * @param {string} awsNodePoolName - * A fully-qualified path representing AwsNodePool resource. - * @returns {string} A string representing the aws_node_pool. - */ - matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName: string) { - return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName).aws_node_pool; - } - - /** - * Return a fully-qualified awsServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - awsServerConfigPath(project:string,location:string) { - return this.pathTemplates.awsServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AwsServerConfig resource. - * - * @param {string} awsServerConfigName - * A fully-qualified path representing AwsServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAwsServerConfigName(awsServerConfigName: string) { - return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).project; - } - - /** - * Parse the location from AwsServerConfig resource. - * - * @param {string} awsServerConfigName - * A fully-qualified path representing AwsServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAwsServerConfigName(awsServerConfigName: string) { - return this.pathTemplates.awsServerConfigPathTemplate.match(awsServerConfigName).location; - } - - /** - * Return a fully-qualified azureClient resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_client - * @returns {string} Resource name string. - */ - azureClientPath(project:string,location:string,azureClient:string) { - return this.pathTemplates.azureClientPathTemplate.render({ - project: project, - location: location, - azure_client: azureClient, - }); - } - - /** - * Parse the project from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).project; - } - - /** - * Parse the location from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).location; - } - - /** - * Parse the azure_client from AzureClient resource. - * - * @param {string} azureClientName - * A fully-qualified path representing AzureClient resource. - * @returns {string} A string representing the azure_client. - */ - matchAzureClientFromAzureClientName(azureClientName: string) { - return this.pathTemplates.azureClientPathTemplate.match(azureClientName).azure_client; - } - - /** - * Return a fully-qualified azureCluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_cluster - * @returns {string} Resource name string. - */ - azureClusterPath(project:string,location:string,azureCluster:string) { - return this.pathTemplates.azureClusterPathTemplate.render({ - project: project, - location: location, - azure_cluster: azureCluster, - }); - } - - /** - * Parse the project from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).project; - } - - /** - * Parse the location from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).location; - } - - /** - * Parse the azure_cluster from AzureCluster resource. - * - * @param {string} azureClusterName - * A fully-qualified path representing AzureCluster resource. - * @returns {string} A string representing the azure_cluster. - */ - matchAzureClusterFromAzureClusterName(azureClusterName: string) { - return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName).azure_cluster; - } - - /** - * Return a fully-qualified azureNodePool resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} azure_cluster - * @param {string} azure_node_pool - * @returns {string} Resource name string. - */ - azureNodePoolPath(project:string,location:string,azureCluster:string,azureNodePool:string) { - return this.pathTemplates.azureNodePoolPathTemplate.render({ - project: project, - location: location, - azure_cluster: azureCluster, - azure_node_pool: azureNodePool, - }); - } - - /** - * Parse the project from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).project; - } - - /** - * Parse the location from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).location; - } - - /** - * Parse the azure_cluster from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the azure_cluster. - */ - matchAzureClusterFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_cluster; - } - - /** - * Parse the azure_node_pool from AzureNodePool resource. - * - * @param {string} azureNodePoolName - * A fully-qualified path representing AzureNodePool resource. - * @returns {string} A string representing the azure_node_pool. - */ - matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName: string) { - return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName).azure_node_pool; - } - - /** - * Return a fully-qualified azureServerConfig resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - azureServerConfigPath(project:string,location:string) { - return this.pathTemplates.azureServerConfigPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from AzureServerConfig resource. - * - * @param {string} azureServerConfigName - * A fully-qualified path representing AzureServerConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAzureServerConfigName(azureServerConfigName: string) { - return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).project; - } - - /** - * Parse the location from AzureServerConfig resource. - * - * @param {string} azureServerConfigName - * A fully-qualified path representing AzureServerConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAzureServerConfigName(azureServerConfigName: string) { - return this.pathTemplates.azureServerConfigPathTemplate.match(azureServerConfigName).location; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project:string,location:string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * 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.azureClustersStub && !this._terminated) { - return this.azureClustersStub.then(stub => { - this._terminated = true; - stub.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client_config.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client_config.json deleted file mode 100644 index 7467958f0d9..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_client_config.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkemulticloud.v1.AzureClusters": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListAzureClients": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteAzureClient": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListAzureClusters": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteAzureCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GenerateAzureAccessToken": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListAzureNodePools": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteAzureNodePool": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAzureServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_proto_list.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_proto_list.json deleted file mode 100644 index 288ec0e3d51..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/azure_clusters_proto_list.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - "../../protos/google/cloud/gkemulticloud/v1/attached_resources.proto", - "../../protos/google/cloud/gkemulticloud/v1/attached_service.proto", - "../../protos/google/cloud/gkemulticloud/v1/aws_resources.proto", - "../../protos/google/cloud/gkemulticloud/v1/aws_service.proto", - "../../protos/google/cloud/gkemulticloud/v1/azure_resources.proto", - "../../protos/google/cloud/gkemulticloud/v1/azure_service.proto", - "../../protos/google/cloud/gkemulticloud/v1/common_resources.proto" -] diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/gapic_metadata.json deleted file mode 100644 index 11d19e83fb6..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,435 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.gkemulticloud.v1", - "libraryPackage": "@google-cloud/gkemulticloud", - "services": { - "AttachedClusters": { - "clients": { - "grpc": { - "libraryClient": "AttachedClustersClient", - "rpcs": { - "GetAttachedCluster": { - "methods": [ - "getAttachedCluster" - ] - }, - "GetAttachedServerConfig": { - "methods": [ - "getAttachedServerConfig" - ] - }, - "GenerateAttachedClusterInstallManifest": { - "methods": [ - "generateAttachedClusterInstallManifest" - ] - }, - "CreateAttachedCluster": { - "methods": [ - "createAttachedCluster" - ] - }, - "UpdateAttachedCluster": { - "methods": [ - "updateAttachedCluster" - ] - }, - "ImportAttachedCluster": { - "methods": [ - "importAttachedCluster" - ] - }, - "DeleteAttachedCluster": { - "methods": [ - "deleteAttachedCluster" - ] - }, - "ListAttachedClusters": { - "methods": [ - "listAttachedClusters", - "listAttachedClustersStream", - "listAttachedClustersAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "AttachedClustersClient", - "rpcs": { - "GetAttachedCluster": { - "methods": [ - "getAttachedCluster" - ] - }, - "GetAttachedServerConfig": { - "methods": [ - "getAttachedServerConfig" - ] - }, - "GenerateAttachedClusterInstallManifest": { - "methods": [ - "generateAttachedClusterInstallManifest" - ] - }, - "CreateAttachedCluster": { - "methods": [ - "createAttachedCluster" - ] - }, - "UpdateAttachedCluster": { - "methods": [ - "updateAttachedCluster" - ] - }, - "ImportAttachedCluster": { - "methods": [ - "importAttachedCluster" - ] - }, - "DeleteAttachedCluster": { - "methods": [ - "deleteAttachedCluster" - ] - }, - "ListAttachedClusters": { - "methods": [ - "listAttachedClusters", - "listAttachedClustersStream", - "listAttachedClustersAsync" - ] - } - } - } - } - }, - "AwsClusters": { - "clients": { - "grpc": { - "libraryClient": "AwsClustersClient", - "rpcs": { - "GetAwsCluster": { - "methods": [ - "getAwsCluster" - ] - }, - "GenerateAwsAccessToken": { - "methods": [ - "generateAwsAccessToken" - ] - }, - "GetAwsNodePool": { - "methods": [ - "getAwsNodePool" - ] - }, - "GetAwsServerConfig": { - "methods": [ - "getAwsServerConfig" - ] - }, - "CreateAwsCluster": { - "methods": [ - "createAwsCluster" - ] - }, - "UpdateAwsCluster": { - "methods": [ - "updateAwsCluster" - ] - }, - "DeleteAwsCluster": { - "methods": [ - "deleteAwsCluster" - ] - }, - "CreateAwsNodePool": { - "methods": [ - "createAwsNodePool" - ] - }, - "UpdateAwsNodePool": { - "methods": [ - "updateAwsNodePool" - ] - }, - "DeleteAwsNodePool": { - "methods": [ - "deleteAwsNodePool" - ] - }, - "ListAwsClusters": { - "methods": [ - "listAwsClusters", - "listAwsClustersStream", - "listAwsClustersAsync" - ] - }, - "ListAwsNodePools": { - "methods": [ - "listAwsNodePools", - "listAwsNodePoolsStream", - "listAwsNodePoolsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "AwsClustersClient", - "rpcs": { - "GetAwsCluster": { - "methods": [ - "getAwsCluster" - ] - }, - "GenerateAwsAccessToken": { - "methods": [ - "generateAwsAccessToken" - ] - }, - "GetAwsNodePool": { - "methods": [ - "getAwsNodePool" - ] - }, - "GetAwsServerConfig": { - "methods": [ - "getAwsServerConfig" - ] - }, - "CreateAwsCluster": { - "methods": [ - "createAwsCluster" - ] - }, - "UpdateAwsCluster": { - "methods": [ - "updateAwsCluster" - ] - }, - "DeleteAwsCluster": { - "methods": [ - "deleteAwsCluster" - ] - }, - "CreateAwsNodePool": { - "methods": [ - "createAwsNodePool" - ] - }, - "UpdateAwsNodePool": { - "methods": [ - "updateAwsNodePool" - ] - }, - "DeleteAwsNodePool": { - "methods": [ - "deleteAwsNodePool" - ] - }, - "ListAwsClusters": { - "methods": [ - "listAwsClusters", - "listAwsClustersStream", - "listAwsClustersAsync" - ] - }, - "ListAwsNodePools": { - "methods": [ - "listAwsNodePools", - "listAwsNodePoolsStream", - "listAwsNodePoolsAsync" - ] - } - } - } - } - }, - "AzureClusters": { - "clients": { - "grpc": { - "libraryClient": "AzureClustersClient", - "rpcs": { - "GetAzureClient": { - "methods": [ - "getAzureClient" - ] - }, - "GetAzureCluster": { - "methods": [ - "getAzureCluster" - ] - }, - "GenerateAzureAccessToken": { - "methods": [ - "generateAzureAccessToken" - ] - }, - "GetAzureNodePool": { - "methods": [ - "getAzureNodePool" - ] - }, - "GetAzureServerConfig": { - "methods": [ - "getAzureServerConfig" - ] - }, - "CreateAzureClient": { - "methods": [ - "createAzureClient" - ] - }, - "DeleteAzureClient": { - "methods": [ - "deleteAzureClient" - ] - }, - "CreateAzureCluster": { - "methods": [ - "createAzureCluster" - ] - }, - "UpdateAzureCluster": { - "methods": [ - "updateAzureCluster" - ] - }, - "DeleteAzureCluster": { - "methods": [ - "deleteAzureCluster" - ] - }, - "CreateAzureNodePool": { - "methods": [ - "createAzureNodePool" - ] - }, - "UpdateAzureNodePool": { - "methods": [ - "updateAzureNodePool" - ] - }, - "DeleteAzureNodePool": { - "methods": [ - "deleteAzureNodePool" - ] - }, - "ListAzureClients": { - "methods": [ - "listAzureClients", - "listAzureClientsStream", - "listAzureClientsAsync" - ] - }, - "ListAzureClusters": { - "methods": [ - "listAzureClusters", - "listAzureClustersStream", - "listAzureClustersAsync" - ] - }, - "ListAzureNodePools": { - "methods": [ - "listAzureNodePools", - "listAzureNodePoolsStream", - "listAzureNodePoolsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "AzureClustersClient", - "rpcs": { - "GetAzureClient": { - "methods": [ - "getAzureClient" - ] - }, - "GetAzureCluster": { - "methods": [ - "getAzureCluster" - ] - }, - "GenerateAzureAccessToken": { - "methods": [ - "generateAzureAccessToken" - ] - }, - "GetAzureNodePool": { - "methods": [ - "getAzureNodePool" - ] - }, - "GetAzureServerConfig": { - "methods": [ - "getAzureServerConfig" - ] - }, - "CreateAzureClient": { - "methods": [ - "createAzureClient" - ] - }, - "DeleteAzureClient": { - "methods": [ - "deleteAzureClient" - ] - }, - "CreateAzureCluster": { - "methods": [ - "createAzureCluster" - ] - }, - "UpdateAzureCluster": { - "methods": [ - "updateAzureCluster" - ] - }, - "DeleteAzureCluster": { - "methods": [ - "deleteAzureCluster" - ] - }, - "CreateAzureNodePool": { - "methods": [ - "createAzureNodePool" - ] - }, - "UpdateAzureNodePool": { - "methods": [ - "updateAzureNodePool" - ] - }, - "DeleteAzureNodePool": { - "methods": [ - "deleteAzureNodePool" - ] - }, - "ListAzureClients": { - "methods": [ - "listAzureClients", - "listAzureClientsStream", - "listAzureClientsAsync" - ] - }, - "ListAzureClusters": { - "methods": [ - "listAzureClusters", - "listAzureClustersStream", - "listAzureClustersAsync" - ] - }, - "ListAzureNodePools": { - "methods": [ - "listAzureNodePools", - "listAzureNodePoolsStream", - "listAzureNodePoolsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/index.ts deleted file mode 100644 index fbd6ce70981..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {AttachedClustersClient} from './attached_clusters_client'; -export {AwsClustersClient} from './aws_clusters_client'; -export {AzureClustersClient} from './azure_clusters_client'; diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 10315f4d268..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const gkemulticloud = require('@google-cloud/gkemulticloud'); - -function main() { - const attachedClustersClient = new gkemulticloud.AttachedClustersClient(); - const awsClustersClient = new gkemulticloud.AwsClustersClient(); - const azureClustersClient = new gkemulticloud.AzureClustersClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 8fe569ff731..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {AttachedClustersClient, AwsClustersClient, AzureClustersClient} from '@google-cloud/gkemulticloud'; - -// check that the client class type name can be used -function doStuffWithAttachedClustersClient(client: AttachedClustersClient) { - client.close(); -} -function doStuffWithAwsClustersClient(client: AwsClustersClient) { - client.close(); -} -function doStuffWithAzureClustersClient(client: AzureClustersClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const attachedClustersClient = new AttachedClustersClient(); - doStuffWithAttachedClustersClient(attachedClustersClient); - // check that the client instance can be created - const awsClustersClient = new AwsClustersClient(); - doStuffWithAwsClustersClient(awsClustersClient); - // check that the client instance can be created - const azureClustersClient = new AzureClustersClient(); - doStuffWithAzureClustersClient(azureClustersClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/install.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/install.ts deleted file mode 100644 index 557a57558e1..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_attached_clusters_v1.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_attached_clusters_v1.ts deleted file mode 100644 index ade3fa78021..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_attached_clusters_v1.ts +++ /dev/null @@ -1,2134 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as attachedclustersModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .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.AttachedClustersClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = attachedclustersModule.v1.AttachedClustersClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = attachedclustersModule.v1.AttachedClustersClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = attachedclustersModule.v1.AttachedClustersClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new attachedclustersModule.v1.AttachedClustersClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.attachedClustersStub, undefined); - await client.initialize(); - assert(client.attachedClustersStub); - }); - - it('has close method for the initialized client', done => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.attachedClustersStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.attachedClustersStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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('getAttachedCluster', () => { - it('invokes getAttachedCluster without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AttachedCluster() - ); - client.innerApiCalls.getAttachedCluster = stubSimpleCall(expectedResponse); - const [response] = await client.getAttachedCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachedCluster without error using callback', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AttachedCluster() - ); - client.innerApiCalls.getAttachedCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAttachedCluster( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAttachedCluster|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachedCluster with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAttachedCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAttachedCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.getAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachedCluster with closed client', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAttachedCluster(request), expectedError); - }); - }); - - describe('getAttachedServerConfig', () => { - it('invokes getAttachedServerConfig without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AttachedServerConfig() - ); - client.innerApiCalls.getAttachedServerConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getAttachedServerConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAttachedServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachedServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachedServerConfig without error using callback', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AttachedServerConfig() - ); - client.innerApiCalls.getAttachedServerConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAttachedServerConfig( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAttachedServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachedServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachedServerConfig with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAttachedServerConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAttachedServerConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getAttachedServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAttachedServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAttachedServerConfig with closed client', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAttachedServerConfig(request), expectedError); - }); - }); - - describe('generateAttachedClusterInstallManifest', () => { - it('invokes generateAttachedClusterInstallManifest without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse() - ); - client.innerApiCalls.generateAttachedClusterInstallManifest = stubSimpleCall(expectedResponse); - const [response] = await client.generateAttachedClusterInstallManifest(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAttachedClusterInstallManifest without error using callback', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse() - ); - client.innerApiCalls.generateAttachedClusterInstallManifest = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.generateAttachedClusterInstallManifest( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAttachedClusterInstallManifest with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.generateAttachedClusterInstallManifest = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.generateAttachedClusterInstallManifest(request), expectedError); - const actualRequest = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAttachedClusterInstallManifest with closed client', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.generateAttachedClusterInstallManifest(request), expectedError); - }); - }); - - describe('createAttachedCluster', () => { - it('invokes createAttachedCluster without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAttachedCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAttachedCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAttachedCluster without error using callback', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAttachedCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAttachedCluster( - 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.createAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAttachedCluster with call error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAttachedCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAttachedCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.createAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAttachedCluster with LRO error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAttachedCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAttachedCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAttachedClusterProgress without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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.checkCreateAttachedClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAttachedClusterProgress with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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.checkCreateAttachedClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAttachedCluster', () => { - it('invokes updateAttachedCluster without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() - ); - request.attachedCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', ['attachedCluster', 'name']); - request.attachedCluster.name = defaultValue1; - const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAttachedCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAttachedCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAttachedCluster without error using callback', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() - ); - request.attachedCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', ['attachedCluster', 'name']); - request.attachedCluster.name = defaultValue1; - const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAttachedCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAttachedCluster( - 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.updateAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAttachedCluster with call error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() - ); - request.attachedCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', ['attachedCluster', 'name']); - request.attachedCluster.name = defaultValue1; - const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAttachedCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAttachedCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAttachedCluster with LRO error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() - ); - request.attachedCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', ['attachedCluster', 'name']); - request.attachedCluster.name = defaultValue1; - const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAttachedCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAttachedCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAttachedClusterProgress without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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.checkUpdateAttachedClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAttachedClusterProgress with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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.checkUpdateAttachedClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('importAttachedCluster', () => { - it('invokes importAttachedCluster without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.importAttachedCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.importAttachedCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.importAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAttachedCluster without error using callback', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.importAttachedCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.importAttachedCluster( - 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.importAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAttachedCluster with call error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importAttachedCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.importAttachedCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.importAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importAttachedCluster with LRO error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importAttachedCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.importAttachedCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.importAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.importAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkImportAttachedClusterProgress without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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.checkImportAttachedClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkImportAttachedClusterProgress with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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.checkImportAttachedClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAttachedCluster', () => { - it('invokes deleteAttachedCluster without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAttachedCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAttachedCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAttachedCluster without error using callback', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAttachedCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAttachedCluster( - 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.deleteAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAttachedCluster with call error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAttachedCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAttachedCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAttachedCluster with LRO error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAttachedCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAttachedCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAttachedCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAttachedCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAttachedClusterProgress without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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.checkDeleteAttachedClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAttachedClusterProgress with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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.checkDeleteAttachedClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listAttachedClusters', () => { - it('invokes listAttachedClusters without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - ]; - client.innerApiCalls.listAttachedClusters = stubSimpleCall(expectedResponse); - const [response] = await client.listAttachedClusters(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAttachedClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAttachedClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAttachedClusters without error using callback', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - ]; - client.innerApiCalls.listAttachedClusters = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAttachedClusters( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAttachedCluster[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAttachedClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAttachedClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAttachedClusters with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAttachedClusters = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAttachedClusters(request), expectedError); - const actualRequest = (client.innerApiCalls.listAttachedClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAttachedClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAttachedClustersStream without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - ]; - client.descriptors.page.listAttachedClusters.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAttachedClustersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AttachedCluster[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AttachedCluster) => { - 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.listAttachedClusters.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAttachedClusters, request)); - assert( - (client.descriptors.page.listAttachedClusters.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAttachedClustersStream with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAttachedClusters.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAttachedClustersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AttachedCluster[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AttachedCluster) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAttachedClusters.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAttachedClusters, request)); - assert( - (client.descriptors.page.listAttachedClusters.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAttachedClusters without error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AttachedCluster()), - ]; - client.descriptors.page.listAttachedClusters.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.gkemulticloud.v1.IAttachedCluster[] = []; - const iterable = client.listAttachedClustersAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAttachedClusters with error', async () => { - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAttachedClusters.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAttachedClustersAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.gkemulticloud.v1.IAttachedCluster[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAttachedClusters.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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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 attachedclustersModule.v1.AttachedClustersClient({ - 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('attachedCluster', () => { - const fakePath = "/rendered/path/attachedCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - attached_cluster: "attachedClusterValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.attachedClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.attachedClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('attachedClusterPath', () => { - const result = client.attachedClusterPath("projectValue", "locationValue", "attachedClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAttachedClusterName', () => { - const result = client.matchProjectFromAttachedClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAttachedClusterName', () => { - const result = client.matchLocationFromAttachedClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAttachedClusterFromAttachedClusterName', () => { - const result = client.matchAttachedClusterFromAttachedClusterName(fakePath); - assert.strictEqual(result, "attachedClusterValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('attachedServerConfig', () => { - const fakePath = "/rendered/path/attachedServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.attachedServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.attachedServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('attachedServerConfigPath', () => { - const result = client.attachedServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.attachedServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAttachedServerConfigName', () => { - const result = client.matchProjectFromAttachedServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAttachedServerConfigName', () => { - const result = client.matchLocationFromAttachedServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsCluster', () => { - const fakePath = "/rendered/path/awsCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aws_cluster: "awsClusterValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsClusterPath', () => { - const result = client.awsClusterPath("projectValue", "locationValue", "awsClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsClusterName', () => { - const result = client.matchProjectFromAwsClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsClusterName', () => { - const result = client.matchLocationFromAwsClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsClusterFromAwsClusterName', () => { - const result = client.matchAwsClusterFromAwsClusterName(fakePath); - assert.strictEqual(result, "awsClusterValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsNodePool', () => { - const fakePath = "/rendered/path/awsNodePool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aws_cluster: "awsClusterValue", - aws_node_pool: "awsNodePoolValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsNodePoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsNodePoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsNodePoolPath', () => { - const result = client.awsNodePoolPath("projectValue", "locationValue", "awsClusterValue", "awsNodePoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsNodePoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsNodePoolName', () => { - const result = client.matchProjectFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsNodePoolName', () => { - const result = client.matchLocationFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsClusterFromAwsNodePoolName', () => { - const result = client.matchAwsClusterFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "awsClusterValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsNodePoolFromAwsNodePoolName', () => { - const result = client.matchAwsNodePoolFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "awsNodePoolValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsServerConfig', () => { - const fakePath = "/rendered/path/awsServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsServerConfigPath', () => { - const result = client.awsServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsServerConfigName', () => { - const result = client.matchProjectFromAwsServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsServerConfigName', () => { - const result = client.matchLocationFromAwsServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureClient', () => { - const fakePath = "/rendered/path/azureClient"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_client: "azureClientValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureClientPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureClientPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureClientPath', () => { - const result = client.azureClientPath("projectValue", "locationValue", "azureClientValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureClientPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureClientName', () => { - const result = client.matchProjectFromAzureClientName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureClientName', () => { - const result = client.matchLocationFromAzureClientName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClientFromAzureClientName', () => { - const result = client.matchAzureClientFromAzureClientName(fakePath); - assert.strictEqual(result, "azureClientValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureCluster', () => { - const fakePath = "/rendered/path/azureCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_cluster: "azureClusterValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureClusterPath', () => { - const result = client.azureClusterPath("projectValue", "locationValue", "azureClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureClusterName', () => { - const result = client.matchProjectFromAzureClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureClusterName', () => { - const result = client.matchLocationFromAzureClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClusterFromAzureClusterName', () => { - const result = client.matchAzureClusterFromAzureClusterName(fakePath); - assert.strictEqual(result, "azureClusterValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureNodePool', () => { - const fakePath = "/rendered/path/azureNodePool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_cluster: "azureClusterValue", - azure_node_pool: "azureNodePoolValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureNodePoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureNodePoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureNodePoolPath', () => { - const result = client.azureNodePoolPath("projectValue", "locationValue", "azureClusterValue", "azureNodePoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureNodePoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureNodePoolName', () => { - const result = client.matchProjectFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureNodePoolName', () => { - const result = client.matchLocationFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClusterFromAzureNodePoolName', () => { - const result = client.matchAzureClusterFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "azureClusterValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureNodePoolFromAzureNodePoolName', () => { - const result = client.matchAzureNodePoolFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "azureNodePoolValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureServerConfig', () => { - const fakePath = "/rendered/path/azureServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureServerConfigPath', () => { - const result = client.azureServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureServerConfigName', () => { - const result = client.matchProjectFromAzureServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureServerConfigName', () => { - const result = client.matchLocationFromAzureServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.locationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new attachedclustersModule.v1.AttachedClustersClient({ - 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_aws_clusters_v1.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_aws_clusters_v1.ts deleted file mode 100644 index d4d9d959bbf..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_aws_clusters_v1.ts +++ /dev/null @@ -1,2799 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as awsclustersModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .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.AwsClustersClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = awsclustersModule.v1.AwsClustersClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = awsclustersModule.v1.AwsClustersClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = awsclustersModule.v1.AwsClustersClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new awsclustersModule.v1.AwsClustersClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.awsClustersStub, undefined); - await client.initialize(); - assert(client.awsClustersStub); - }); - - it('has close method for the initialized client', done => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.awsClustersStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.awsClustersStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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('getAwsCluster', () => { - it('invokes getAwsCluster without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AwsCluster() - ); - client.innerApiCalls.getAwsCluster = stubSimpleCall(expectedResponse); - const [response] = await client.getAwsCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsCluster without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AwsCluster() - ); - client.innerApiCalls.getAwsCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAwsCluster( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsCluster|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsCluster with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAwsCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAwsCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.getAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsCluster with closed client', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsClusterRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAwsCluster(request), expectedError); - }); - }); - - describe('generateAwsAccessToken', () => { - it('invokes generateAwsAccessToken without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest', ['awsCluster']); - request.awsCluster = defaultValue1; - const expectedHeaderRequestParams = `aws_cluster=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse() - ); - client.innerApiCalls.generateAwsAccessToken = stubSimpleCall(expectedResponse); - const [response] = await client.generateAwsAccessToken(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateAwsAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAwsAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAwsAccessToken without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest', ['awsCluster']); - request.awsCluster = defaultValue1; - const expectedHeaderRequestParams = `aws_cluster=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse() - ); - client.innerApiCalls.generateAwsAccessToken = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.generateAwsAccessToken( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateAwsAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAwsAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAwsAccessToken with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest', ['awsCluster']); - request.awsCluster = defaultValue1; - const expectedHeaderRequestParams = `aws_cluster=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.generateAwsAccessToken = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.generateAwsAccessToken(request), expectedError); - const actualRequest = (client.innerApiCalls.generateAwsAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAwsAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAwsAccessToken with closed client', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest', ['awsCluster']); - request.awsCluster = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.generateAwsAccessToken(request), expectedError); - }); - }); - - describe('getAwsNodePool', () => { - it('invokes getAwsNodePool without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AwsNodePool() - ); - client.innerApiCalls.getAwsNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.getAwsNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsNodePool without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AwsNodePool() - ); - client.innerApiCalls.getAwsNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAwsNodePool( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsNodePool|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsNodePool with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAwsNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAwsNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.getAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsNodePool with closed client', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAwsNodePool(request), expectedError); - }); - }); - - describe('getAwsServerConfig', () => { - it('invokes getAwsServerConfig without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AwsServerConfig() - ); - client.innerApiCalls.getAwsServerConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getAwsServerConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAwsServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsServerConfig without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AwsServerConfig() - ); - client.innerApiCalls.getAwsServerConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAwsServerConfig( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsServerConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAwsServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsServerConfig with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAwsServerConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAwsServerConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getAwsServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAwsServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAwsServerConfig with closed client', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAwsServerConfig(request), expectedError); - }); - }); - - describe('createAwsCluster', () => { - it('invokes createAwsCluster without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAwsCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAwsCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAwsCluster without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAwsCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAwsCluster( - 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.createAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAwsCluster with call error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAwsCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAwsCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.createAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAwsCluster with LRO error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAwsCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAwsCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAwsClusterProgress without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkCreateAwsClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAwsClusterProgress with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkCreateAwsClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAwsCluster', () => { - it('invokes updateAwsCluster without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() - ); - request.awsCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest', ['awsCluster', 'name']); - request.awsCluster.name = defaultValue1; - const expectedHeaderRequestParams = `aws_cluster.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAwsCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAwsCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAwsCluster without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() - ); - request.awsCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest', ['awsCluster', 'name']); - request.awsCluster.name = defaultValue1; - const expectedHeaderRequestParams = `aws_cluster.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAwsCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAwsCluster( - 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.updateAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAwsCluster with call error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() - ); - request.awsCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest', ['awsCluster', 'name']); - request.awsCluster.name = defaultValue1; - const expectedHeaderRequestParams = `aws_cluster.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAwsCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAwsCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAwsCluster with LRO error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest() - ); - request.awsCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest', ['awsCluster', 'name']); - request.awsCluster.name = defaultValue1; - const expectedHeaderRequestParams = `aws_cluster.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAwsCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAwsCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAwsClusterProgress without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkUpdateAwsClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAwsClusterProgress with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkUpdateAwsClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAwsCluster', () => { - it('invokes deleteAwsCluster without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAwsCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAwsCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAwsCluster without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAwsCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAwsCluster( - 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.deleteAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAwsCluster with call error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAwsCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAwsCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAwsCluster with LRO error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAwsCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAwsCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAwsCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAwsClusterProgress without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkDeleteAwsClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAwsClusterProgress with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkDeleteAwsClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createAwsNodePool', () => { - it('invokes createAwsNodePool without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAwsNodePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAwsNodePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAwsNodePool without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAwsNodePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAwsNodePool( - 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.createAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAwsNodePool with call error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAwsNodePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAwsNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.createAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAwsNodePool with LRO error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAwsNodePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAwsNodePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAwsNodePoolProgress without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkCreateAwsNodePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAwsNodePoolProgress with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkCreateAwsNodePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAwsNodePool', () => { - it('invokes updateAwsNodePool without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() - ); - request.awsNodePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest', ['awsNodePool', 'name']); - request.awsNodePool.name = defaultValue1; - const expectedHeaderRequestParams = `aws_node_pool.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAwsNodePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAwsNodePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAwsNodePool without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() - ); - request.awsNodePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest', ['awsNodePool', 'name']); - request.awsNodePool.name = defaultValue1; - const expectedHeaderRequestParams = `aws_node_pool.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAwsNodePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAwsNodePool( - 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.updateAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAwsNodePool with call error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() - ); - request.awsNodePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest', ['awsNodePool', 'name']); - request.awsNodePool.name = defaultValue1; - const expectedHeaderRequestParams = `aws_node_pool.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAwsNodePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAwsNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAwsNodePool with LRO error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest() - ); - request.awsNodePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest', ['awsNodePool', 'name']); - request.awsNodePool.name = defaultValue1; - const expectedHeaderRequestParams = `aws_node_pool.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAwsNodePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAwsNodePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAwsNodePoolProgress without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkUpdateAwsNodePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAwsNodePoolProgress with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkUpdateAwsNodePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAwsNodePool', () => { - it('invokes deleteAwsNodePool without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAwsNodePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAwsNodePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAwsNodePool without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAwsNodePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAwsNodePool( - 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.deleteAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAwsNodePool with call error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAwsNodePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAwsNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAwsNodePool with LRO error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAwsNodePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAwsNodePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAwsNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAwsNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAwsNodePoolProgress without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkDeleteAwsNodePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAwsNodePoolProgress with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - 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.checkDeleteAwsNodePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listAwsClusters', () => { - it('invokes listAwsClusters without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - ]; - client.innerApiCalls.listAwsClusters = stubSimpleCall(expectedResponse); - const [response] = await client.listAwsClusters(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAwsClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAwsClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAwsClusters without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - ]; - client.innerApiCalls.listAwsClusters = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAwsClusters( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsCluster[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAwsClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAwsClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAwsClusters with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAwsClusters = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAwsClusters(request), expectedError); - const actualRequest = (client.innerApiCalls.listAwsClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAwsClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAwsClustersStream without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - ]; - client.descriptors.page.listAwsClusters.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAwsClustersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AwsCluster[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AwsCluster) => { - 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.listAwsClusters.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAwsClusters, request)); - assert( - (client.descriptors.page.listAwsClusters.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAwsClustersStream with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAwsClusters.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAwsClustersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AwsCluster[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AwsCluster) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAwsClusters.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAwsClusters, request)); - assert( - (client.descriptors.page.listAwsClusters.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAwsClusters without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsCluster()), - ]; - client.descriptors.page.listAwsClusters.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.gkemulticloud.v1.IAwsCluster[] = []; - const iterable = client.listAwsClustersAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAwsClusters.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAwsClusters.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAwsClusters with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAwsClusters.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAwsClustersAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.gkemulticloud.v1.IAwsCluster[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAwsClusters.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAwsClusters.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAwsNodePools', () => { - it('invokes listAwsNodePools without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - ]; - client.innerApiCalls.listAwsNodePools = stubSimpleCall(expectedResponse); - const [response] = await client.listAwsNodePools(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAwsNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAwsNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAwsNodePools without error using callback', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - ]; - client.innerApiCalls.listAwsNodePools = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAwsNodePools( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAwsNodePool[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAwsNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAwsNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAwsNodePools with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAwsNodePools = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAwsNodePools(request), expectedError); - const actualRequest = (client.innerApiCalls.listAwsNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAwsNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAwsNodePoolsStream without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - ]; - client.descriptors.page.listAwsNodePools.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAwsNodePoolsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AwsNodePool[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AwsNodePool) => { - 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.listAwsNodePools.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAwsNodePools, request)); - assert( - (client.descriptors.page.listAwsNodePools.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAwsNodePoolsStream with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAwsNodePools.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAwsNodePoolsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AwsNodePool[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AwsNodePool) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAwsNodePools.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAwsNodePools, request)); - assert( - (client.descriptors.page.listAwsNodePools.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAwsNodePools without error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AwsNodePool()), - ]; - client.descriptors.page.listAwsNodePools.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.gkemulticloud.v1.IAwsNodePool[] = []; - const iterable = client.listAwsNodePoolsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAwsNodePools.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAwsNodePools.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAwsNodePools with error', async () => { - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAwsNodePools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAwsNodePoolsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.gkemulticloud.v1.IAwsNodePool[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAwsNodePools.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAwsNodePools.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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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 awsclustersModule.v1.AwsClustersClient({ - 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('attachedCluster', () => { - const fakePath = "/rendered/path/attachedCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - attached_cluster: "attachedClusterValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.attachedClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.attachedClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('attachedClusterPath', () => { - const result = client.attachedClusterPath("projectValue", "locationValue", "attachedClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAttachedClusterName', () => { - const result = client.matchProjectFromAttachedClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAttachedClusterName', () => { - const result = client.matchLocationFromAttachedClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAttachedClusterFromAttachedClusterName', () => { - const result = client.matchAttachedClusterFromAttachedClusterName(fakePath); - assert.strictEqual(result, "attachedClusterValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('attachedServerConfig', () => { - const fakePath = "/rendered/path/attachedServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.attachedServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.attachedServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('attachedServerConfigPath', () => { - const result = client.attachedServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.attachedServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAttachedServerConfigName', () => { - const result = client.matchProjectFromAttachedServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAttachedServerConfigName', () => { - const result = client.matchLocationFromAttachedServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsCluster', () => { - const fakePath = "/rendered/path/awsCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aws_cluster: "awsClusterValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsClusterPath', () => { - const result = client.awsClusterPath("projectValue", "locationValue", "awsClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsClusterName', () => { - const result = client.matchProjectFromAwsClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsClusterName', () => { - const result = client.matchLocationFromAwsClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsClusterFromAwsClusterName', () => { - const result = client.matchAwsClusterFromAwsClusterName(fakePath); - assert.strictEqual(result, "awsClusterValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsNodePool', () => { - const fakePath = "/rendered/path/awsNodePool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aws_cluster: "awsClusterValue", - aws_node_pool: "awsNodePoolValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsNodePoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsNodePoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsNodePoolPath', () => { - const result = client.awsNodePoolPath("projectValue", "locationValue", "awsClusterValue", "awsNodePoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsNodePoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsNodePoolName', () => { - const result = client.matchProjectFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsNodePoolName', () => { - const result = client.matchLocationFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsClusterFromAwsNodePoolName', () => { - const result = client.matchAwsClusterFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "awsClusterValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsNodePoolFromAwsNodePoolName', () => { - const result = client.matchAwsNodePoolFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "awsNodePoolValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsServerConfig', () => { - const fakePath = "/rendered/path/awsServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsServerConfigPath', () => { - const result = client.awsServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsServerConfigName', () => { - const result = client.matchProjectFromAwsServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsServerConfigName', () => { - const result = client.matchLocationFromAwsServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureClient', () => { - const fakePath = "/rendered/path/azureClient"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_client: "azureClientValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureClientPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureClientPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureClientPath', () => { - const result = client.azureClientPath("projectValue", "locationValue", "azureClientValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureClientPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureClientName', () => { - const result = client.matchProjectFromAzureClientName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureClientName', () => { - const result = client.matchLocationFromAzureClientName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClientFromAzureClientName', () => { - const result = client.matchAzureClientFromAzureClientName(fakePath); - assert.strictEqual(result, "azureClientValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureCluster', () => { - const fakePath = "/rendered/path/azureCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_cluster: "azureClusterValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureClusterPath', () => { - const result = client.azureClusterPath("projectValue", "locationValue", "azureClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureClusterName', () => { - const result = client.matchProjectFromAzureClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureClusterName', () => { - const result = client.matchLocationFromAzureClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClusterFromAzureClusterName', () => { - const result = client.matchAzureClusterFromAzureClusterName(fakePath); - assert.strictEqual(result, "azureClusterValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureNodePool', () => { - const fakePath = "/rendered/path/azureNodePool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_cluster: "azureClusterValue", - azure_node_pool: "azureNodePoolValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureNodePoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureNodePoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureNodePoolPath', () => { - const result = client.azureNodePoolPath("projectValue", "locationValue", "azureClusterValue", "azureNodePoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureNodePoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureNodePoolName', () => { - const result = client.matchProjectFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureNodePoolName', () => { - const result = client.matchLocationFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClusterFromAzureNodePoolName', () => { - const result = client.matchAzureClusterFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "azureClusterValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureNodePoolFromAzureNodePoolName', () => { - const result = client.matchAzureNodePoolFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "azureNodePoolValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureServerConfig', () => { - const fakePath = "/rendered/path/azureServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureServerConfigPath', () => { - const result = client.azureServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureServerConfigName', () => { - const result = client.matchProjectFromAzureServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureServerConfigName', () => { - const result = client.matchLocationFromAzureServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.locationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new awsclustersModule.v1.AwsClustersClient({ - 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_azure_clusters_v1.ts b/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_azure_clusters_v1.ts deleted file mode 100644 index ce9abd1aef5..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/v1/test/gapic_azure_clusters_v1.ts +++ /dev/null @@ -1,3460 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as azureclustersModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .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.AzureClustersClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = azureclustersModule.v1.AzureClustersClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = azureclustersModule.v1.AzureClustersClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = azureclustersModule.v1.AzureClustersClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new azureclustersModule.v1.AzureClustersClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.azureClustersStub, undefined); - await client.initialize(); - assert(client.azureClustersStub); - }); - - it('has close method for the initialized client', done => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.azureClustersStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.azureClustersStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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('getAzureClient', () => { - it('invokes getAzureClient without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClientRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AzureClient() - ); - client.innerApiCalls.getAzureClient = stubSimpleCall(expectedResponse); - const [response] = await client.getAzureClient(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureClient without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClientRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AzureClient() - ); - client.innerApiCalls.getAzureClient = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAzureClient( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureClient|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureClient with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClientRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAzureClient = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAzureClient(request), expectedError); - const actualRequest = (client.innerApiCalls.getAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureClient with closed client', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClientRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAzureClient(request), expectedError); - }); - }); - - describe('getAzureCluster', () => { - it('invokes getAzureCluster without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AzureCluster() - ); - client.innerApiCalls.getAzureCluster = stubSimpleCall(expectedResponse); - const [response] = await client.getAzureCluster(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureCluster without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AzureCluster() - ); - client.innerApiCalls.getAzureCluster = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAzureCluster( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureCluster|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureCluster with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAzureCluster = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAzureCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.getAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureCluster with closed client', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureClusterRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAzureCluster(request), expectedError); - }); - }); - - describe('generateAzureAccessToken', () => { - it('invokes generateAzureAccessToken without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest', ['azureCluster']); - request.azureCluster = defaultValue1; - const expectedHeaderRequestParams = `azure_cluster=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse() - ); - client.innerApiCalls.generateAzureAccessToken = stubSimpleCall(expectedResponse); - const [response] = await client.generateAzureAccessToken(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateAzureAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAzureAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAzureAccessToken without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest', ['azureCluster']); - request.azureCluster = defaultValue1; - const expectedHeaderRequestParams = `azure_cluster=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse() - ); - client.innerApiCalls.generateAzureAccessToken = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.generateAzureAccessToken( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IGenerateAzureAccessTokenResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.generateAzureAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAzureAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAzureAccessToken with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest', ['azureCluster']); - request.azureCluster = defaultValue1; - const expectedHeaderRequestParams = `azure_cluster=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.generateAzureAccessToken = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.generateAzureAccessToken(request), expectedError); - const actualRequest = (client.innerApiCalls.generateAzureAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.generateAzureAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes generateAzureAccessToken with closed client', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest', ['azureCluster']); - request.azureCluster = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.generateAzureAccessToken(request), expectedError); - }); - }); - - describe('getAzureNodePool', () => { - it('invokes getAzureNodePool without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AzureNodePool() - ); - client.innerApiCalls.getAzureNodePool = stubSimpleCall(expectedResponse); - const [response] = await client.getAzureNodePool(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureNodePool without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AzureNodePool() - ); - client.innerApiCalls.getAzureNodePool = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAzureNodePool( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureNodePool|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureNodePool with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAzureNodePool = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAzureNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.getAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureNodePool with closed client', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAzureNodePool(request), expectedError); - }); - }); - - describe('getAzureServerConfig', () => { - it('invokes getAzureServerConfig without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AzureServerConfig() - ); - client.innerApiCalls.getAzureServerConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getAzureServerConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAzureServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureServerConfig without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.AzureServerConfig() - ); - client.innerApiCalls.getAzureServerConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAzureServerConfig( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureServerConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAzureServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureServerConfig with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAzureServerConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAzureServerConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getAzureServerConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAzureServerConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAzureServerConfig with closed client', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAzureServerConfig(request), expectedError); - }); - }); - - describe('createAzureClient', () => { - it('invokes createAzureClient without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClientRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAzureClient = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAzureClient(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureClient without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClientRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAzureClient = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAzureClient( - 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.createAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureClient with call error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClientRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAzureClient = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAzureClient(request), expectedError); - const actualRequest = (client.innerApiCalls.createAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureClient with LRO error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClientRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAzureClient = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAzureClient(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAzureClientProgress without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkCreateAzureClientProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAzureClientProgress with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkCreateAzureClientProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAzureClient', () => { - it('invokes deleteAzureClient without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAzureClient = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAzureClient(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureClient without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAzureClient = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAzureClient( - 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.deleteAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureClient with call error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAzureClient = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAzureClient(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureClient with LRO error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAzureClient = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAzureClient(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAzureClient as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureClient as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAzureClientProgress without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkDeleteAzureClientProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAzureClientProgress with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkDeleteAzureClientProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createAzureCluster', () => { - it('invokes createAzureCluster without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAzureCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAzureCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureCluster without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAzureCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAzureCluster( - 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.createAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureCluster with call error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAzureCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAzureCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.createAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureCluster with LRO error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAzureCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAzureCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAzureClusterProgress without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkCreateAzureClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAzureClusterProgress with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkCreateAzureClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAzureCluster', () => { - it('invokes updateAzureCluster without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() - ); - request.azureCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest', ['azureCluster', 'name']); - request.azureCluster.name = defaultValue1; - const expectedHeaderRequestParams = `azure_cluster.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAzureCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAzureCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAzureCluster without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() - ); - request.azureCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest', ['azureCluster', 'name']); - request.azureCluster.name = defaultValue1; - const expectedHeaderRequestParams = `azure_cluster.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAzureCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAzureCluster( - 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.updateAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAzureCluster with call error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() - ); - request.azureCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest', ['azureCluster', 'name']); - request.azureCluster.name = defaultValue1; - const expectedHeaderRequestParams = `azure_cluster.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAzureCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAzureCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAzureCluster with LRO error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest() - ); - request.azureCluster ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest', ['azureCluster', 'name']); - request.azureCluster.name = defaultValue1; - const expectedHeaderRequestParams = `azure_cluster.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAzureCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAzureCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAzureClusterProgress without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkUpdateAzureClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAzureClusterProgress with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkUpdateAzureClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAzureCluster', () => { - it('invokes deleteAzureCluster without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAzureCluster = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAzureCluster(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureCluster without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAzureCluster = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAzureCluster( - 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.deleteAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureCluster with call error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAzureCluster = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAzureCluster(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureCluster with LRO error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAzureCluster = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAzureCluster(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAzureCluster as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureCluster as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAzureClusterProgress without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkDeleteAzureClusterProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAzureClusterProgress with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkDeleteAzureClusterProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createAzureNodePool', () => { - it('invokes createAzureNodePool without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAzureNodePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAzureNodePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureNodePool without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAzureNodePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAzureNodePool( - 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.createAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureNodePool with call error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAzureNodePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAzureNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.createAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAzureNodePool with LRO error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAzureNodePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAzureNodePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAzureNodePoolProgress without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkCreateAzureNodePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAzureNodePoolProgress with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkCreateAzureNodePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAzureNodePool', () => { - it('invokes updateAzureNodePool without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() - ); - request.azureNodePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest', ['azureNodePool', 'name']); - request.azureNodePool.name = defaultValue1; - const expectedHeaderRequestParams = `azure_node_pool.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAzureNodePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAzureNodePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAzureNodePool without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() - ); - request.azureNodePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest', ['azureNodePool', 'name']); - request.azureNodePool.name = defaultValue1; - const expectedHeaderRequestParams = `azure_node_pool.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAzureNodePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAzureNodePool( - 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.updateAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAzureNodePool with call error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() - ); - request.azureNodePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest', ['azureNodePool', 'name']); - request.azureNodePool.name = defaultValue1; - const expectedHeaderRequestParams = `azure_node_pool.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAzureNodePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAzureNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAzureNodePool with LRO error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest() - ); - request.azureNodePool ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest', ['azureNodePool', 'name']); - request.azureNodePool.name = defaultValue1; - const expectedHeaderRequestParams = `azure_node_pool.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAzureNodePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAzureNodePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAzureNodePoolProgress without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkUpdateAzureNodePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAzureNodePoolProgress with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkUpdateAzureNodePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAzureNodePool', () => { - it('invokes deleteAzureNodePool without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAzureNodePool = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAzureNodePool(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureNodePool without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAzureNodePool = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAzureNodePool( - 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.deleteAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureNodePool with call error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAzureNodePool = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAzureNodePool(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAzureNodePool with LRO error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAzureNodePool = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAzureNodePool(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAzureNodePool as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAzureNodePool as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAzureNodePoolProgress without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkDeleteAzureNodePoolProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAzureNodePoolProgress with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - 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.checkDeleteAzureNodePoolProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listAzureClients', () => { - it('invokes listAzureClients without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - ]; - client.innerApiCalls.listAzureClients = stubSimpleCall(expectedResponse); - const [response] = await client.listAzureClients(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAzureClients as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureClients as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureClients without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - ]; - client.innerApiCalls.listAzureClients = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAzureClients( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureClient[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAzureClients as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureClients as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureClients with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAzureClients = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAzureClients(request), expectedError); - const actualRequest = (client.innerApiCalls.listAzureClients as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureClients as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureClientsStream without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - ]; - client.descriptors.page.listAzureClients.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAzureClientsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AzureClient[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureClient) => { - 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.listAzureClients.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAzureClients, request)); - assert( - (client.descriptors.page.listAzureClients.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAzureClientsStream with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAzureClients.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAzureClientsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AzureClient[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureClient) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAzureClients.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAzureClients, request)); - assert( - (client.descriptors.page.listAzureClients.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAzureClients without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureClient()), - ]; - client.descriptors.page.listAzureClients.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.gkemulticloud.v1.IAzureClient[] = []; - const iterable = client.listAzureClientsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAzureClients.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAzureClients.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAzureClients with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClientsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClientsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAzureClients.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAzureClientsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.gkemulticloud.v1.IAzureClient[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAzureClients.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAzureClients.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAzureClusters', () => { - it('invokes listAzureClusters without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - ]; - client.innerApiCalls.listAzureClusters = stubSimpleCall(expectedResponse); - const [response] = await client.listAzureClusters(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAzureClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureClusters without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - ]; - client.innerApiCalls.listAzureClusters = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAzureClusters( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureCluster[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAzureClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureClusters with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAzureClusters = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAzureClusters(request), expectedError); - const actualRequest = (client.innerApiCalls.listAzureClusters as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureClusters as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureClustersStream without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - ]; - client.descriptors.page.listAzureClusters.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAzureClustersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AzureCluster[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureCluster) => { - 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.listAzureClusters.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAzureClusters, request)); - assert( - (client.descriptors.page.listAzureClusters.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAzureClustersStream with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAzureClusters.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAzureClustersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AzureCluster[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureCluster) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAzureClusters.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAzureClusters, request)); - assert( - (client.descriptors.page.listAzureClusters.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAzureClusters without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureCluster()), - ]; - client.descriptors.page.listAzureClusters.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.gkemulticloud.v1.IAzureCluster[] = []; - const iterable = client.listAzureClustersAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAzureClusters.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAzureClusters.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAzureClusters with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureClustersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureClustersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAzureClusters.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAzureClustersAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.gkemulticloud.v1.IAzureCluster[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAzureClusters.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAzureClusters.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAzureNodePools', () => { - it('invokes listAzureNodePools without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - ]; - client.innerApiCalls.listAzureNodePools = stubSimpleCall(expectedResponse); - const [response] = await client.listAzureNodePools(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAzureNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureNodePools without error using callback', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - ]; - client.innerApiCalls.listAzureNodePools = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAzureNodePools( - request, - (err?: Error|null, result?: protos.google.cloud.gkemulticloud.v1.IAzureNodePool[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAzureNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureNodePools with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAzureNodePools = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAzureNodePools(request), expectedError); - const actualRequest = (client.innerApiCalls.listAzureNodePools as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAzureNodePools as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAzureNodePoolsStream without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - ]; - client.descriptors.page.listAzureNodePools.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAzureNodePoolsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AzureNodePool[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureNodePool) => { - 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.listAzureNodePools.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAzureNodePools, request)); - assert( - (client.descriptors.page.listAzureNodePools.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAzureNodePoolsStream with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAzureNodePools.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAzureNodePoolsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkemulticloud.v1.AzureNodePool[] = []; - stream.on('data', (response: protos.google.cloud.gkemulticloud.v1.AzureNodePool) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAzureNodePools.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAzureNodePools, request)); - assert( - (client.descriptors.page.listAzureNodePools.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAzureNodePools without error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - generateSampleMessage(new protos.google.cloud.gkemulticloud.v1.AzureNodePool()), - ]; - client.descriptors.page.listAzureNodePools.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.gkemulticloud.v1.IAzureNodePool[] = []; - const iterable = client.listAzureNodePoolsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAzureNodePools.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAzureNodePools.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAzureNodePools with error', async () => { - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAzureNodePools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAzureNodePoolsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.gkemulticloud.v1.IAzureNodePool[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAzureNodePools.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAzureNodePools.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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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 azureclustersModule.v1.AzureClustersClient({ - 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('attachedCluster', () => { - const fakePath = "/rendered/path/attachedCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - attached_cluster: "attachedClusterValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.attachedClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.attachedClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('attachedClusterPath', () => { - const result = client.attachedClusterPath("projectValue", "locationValue", "attachedClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAttachedClusterName', () => { - const result = client.matchProjectFromAttachedClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAttachedClusterName', () => { - const result = client.matchLocationFromAttachedClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAttachedClusterFromAttachedClusterName', () => { - const result = client.matchAttachedClusterFromAttachedClusterName(fakePath); - assert.strictEqual(result, "attachedClusterValue"); - assert((client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('attachedServerConfig', () => { - const fakePath = "/rendered/path/attachedServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.attachedServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.attachedServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('attachedServerConfigPath', () => { - const result = client.attachedServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.attachedServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAttachedServerConfigName', () => { - const result = client.matchProjectFromAttachedServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAttachedServerConfigName', () => { - const result = client.matchLocationFromAttachedServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.attachedServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsCluster', () => { - const fakePath = "/rendered/path/awsCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aws_cluster: "awsClusterValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsClusterPath', () => { - const result = client.awsClusterPath("projectValue", "locationValue", "awsClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsClusterName', () => { - const result = client.matchProjectFromAwsClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsClusterName', () => { - const result = client.matchLocationFromAwsClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsClusterFromAwsClusterName', () => { - const result = client.matchAwsClusterFromAwsClusterName(fakePath); - assert.strictEqual(result, "awsClusterValue"); - assert((client.pathTemplates.awsClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsNodePool', () => { - const fakePath = "/rendered/path/awsNodePool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - aws_cluster: "awsClusterValue", - aws_node_pool: "awsNodePoolValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsNodePoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsNodePoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsNodePoolPath', () => { - const result = client.awsNodePoolPath("projectValue", "locationValue", "awsClusterValue", "awsNodePoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsNodePoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsNodePoolName', () => { - const result = client.matchProjectFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsNodePoolName', () => { - const result = client.matchLocationFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsClusterFromAwsNodePoolName', () => { - const result = client.matchAwsClusterFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "awsClusterValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAwsNodePoolFromAwsNodePoolName', () => { - const result = client.matchAwsNodePoolFromAwsNodePoolName(fakePath); - assert.strictEqual(result, "awsNodePoolValue"); - assert((client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('awsServerConfig', () => { - const fakePath = "/rendered/path/awsServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.awsServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.awsServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('awsServerConfigPath', () => { - const result = client.awsServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.awsServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAwsServerConfigName', () => { - const result = client.matchProjectFromAwsServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAwsServerConfigName', () => { - const result = client.matchLocationFromAwsServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureClient', () => { - const fakePath = "/rendered/path/azureClient"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_client: "azureClientValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureClientPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureClientPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureClientPath', () => { - const result = client.azureClientPath("projectValue", "locationValue", "azureClientValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureClientPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureClientName', () => { - const result = client.matchProjectFromAzureClientName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureClientName', () => { - const result = client.matchLocationFromAzureClientName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClientFromAzureClientName', () => { - const result = client.matchAzureClientFromAzureClientName(fakePath); - assert.strictEqual(result, "azureClientValue"); - assert((client.pathTemplates.azureClientPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureCluster', () => { - const fakePath = "/rendered/path/azureCluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_cluster: "azureClusterValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureClusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureClusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureClusterPath', () => { - const result = client.azureClusterPath("projectValue", "locationValue", "azureClusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureClusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureClusterName', () => { - const result = client.matchProjectFromAzureClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureClusterName', () => { - const result = client.matchLocationFromAzureClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClusterFromAzureClusterName', () => { - const result = client.matchAzureClusterFromAzureClusterName(fakePath); - assert.strictEqual(result, "azureClusterValue"); - assert((client.pathTemplates.azureClusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureNodePool', () => { - const fakePath = "/rendered/path/azureNodePool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - azure_cluster: "azureClusterValue", - azure_node_pool: "azureNodePoolValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureNodePoolPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureNodePoolPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureNodePoolPath', () => { - const result = client.azureNodePoolPath("projectValue", "locationValue", "azureClusterValue", "azureNodePoolValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureNodePoolPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureNodePoolName', () => { - const result = client.matchProjectFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureNodePoolName', () => { - const result = client.matchLocationFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureClusterFromAzureNodePoolName', () => { - const result = client.matchAzureClusterFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "azureClusterValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAzureNodePoolFromAzureNodePoolName', () => { - const result = client.matchAzureNodePoolFromAzureNodePoolName(fakePath); - assert.strictEqual(result, "azureNodePoolValue"); - assert((client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('azureServerConfig', () => { - const fakePath = "/rendered/path/azureServerConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.azureServerConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.azureServerConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('azureServerConfigPath', () => { - const result = client.azureServerConfigPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.azureServerConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAzureServerConfigName', () => { - const result = client.matchProjectFromAzureServerConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAzureServerConfigName', () => { - const result = client.matchLocationFromAzureServerConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.azureServerConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.locationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new azureclustersModule.v1.AzureClustersClient({ - 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/tsconfig.json b/owl-bot-staging/google-cloud-gkemulticloud/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/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-gkemulticloud/v1/webpack.config.js b/owl-bot-staging/google-cloud-gkemulticloud/v1/webpack.config.js deleted file mode 100644 index 01b1c9f6e02..00000000000 --- a/owl-bot-staging/google-cloud-gkemulticloud/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: 'AttachedClusters', - filename: './attached-clusters.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-gkemulticloud/README.md b/packages/google-cloud-gkemulticloud/README.md index b7eea5c7107..f6796dcb027 100644 --- a/packages/google-cloud-gkemulticloud/README.md +++ b/packages/google-cloud-gkemulticloud/README.md @@ -120,6 +120,14 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Attached_clusters.create_attached_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.create_attached_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.create_attached_cluster.js,samples/README.md) | +| Attached_clusters.delete_attached_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.delete_attached_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.delete_attached_cluster.js,samples/README.md) | +| Attached_clusters.generate_attached_cluster_install_manifest | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js,samples/README.md) | +| Attached_clusters.get_attached_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_cluster.js,samples/README.md) | +| Attached_clusters.get_attached_server_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_server_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-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_server_config.js,samples/README.md) | +| Attached_clusters.import_attached_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.import_attached_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.import_attached_cluster.js,samples/README.md) | +| Attached_clusters.list_attached_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.list_attached_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.list_attached_clusters.js,samples/README.md) | +| Attached_clusters.update_attached_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.update_attached_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.update_attached_cluster.js,samples/README.md) | | Aws_clusters.create_aws_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_cluster.js,samples/README.md) | | Aws_clusters.create_aws_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_node_pool.js,samples/README.md) | | Aws_clusters.delete_aws_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_cluster.js,samples/README.md) | diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_resources.proto b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/attached_resources.proto similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_resources.proto rename to packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/attached_resources.proto diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_service.proto b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/attached_service.proto similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/protos/google/cloud/gkemulticloud/v1/attached_service.proto rename to packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/attached_service.proto diff --git a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/aws_resources.proto b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/aws_resources.proto index 60e65942d1a..dc7e918209e 100644 --- a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/aws_resources.proto +++ b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/aws_resources.proto @@ -107,10 +107,12 @@ message AwsCluster { bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this cluster was created. - google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this cluster was last updated. - google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Allows clients to perform consistent read-modify-writes // through optimistic concurrency control. @@ -131,16 +133,26 @@ message AwsCluster { map annotations = 14 [(google.api.field_behavior) = OPTIONAL]; // Output only. Workload Identity settings. - WorkloadIdentityConfig workload_identity_config = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + WorkloadIdentityConfig workload_identity_config = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. PEM encoded x509 certificate of the cluster root of trust. - string cluster_ca_certificate = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + string cluster_ca_certificate = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Fleet configuration. - Fleet fleet = 18 [(google.api.field_behavior) = OPTIONAL]; + // Required. Fleet configuration. + Fleet fleet = 18 [(google.api.field_behavior) = REQUIRED]; // Optional. Logging configuration for this cluster. LoggingConfig logging_config = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A set of errors found in the cluster. + repeated AwsClusterError errors = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Monitoring configuration for this cluster. + MonitoringConfig monitoring_config = 21 + [(google.api.field_behavior) = OPTIONAL]; } // ControlPlane defines common parameters between control plane nodes. @@ -171,10 +183,11 @@ message AwsControlPlane { // Optional. The IDs of additional security groups to add to control plane // replicas. The Anthos Multi-Cloud API will automatically create and manage // security groups with the minimum rules needed for a functioning cluster. - repeated string security_group_ids = 5 [(google.api.field_behavior) = OPTIONAL]; + repeated string security_group_ids = 5 + [(google.api.field_behavior) = OPTIONAL]; - // Required. The name or ARN of the AWS IAM instance profile to assign to each control - // plane replica. + // Required. The name or ARN of the AWS IAM instance profile to assign to each + // control plane replica. string iam_instance_profile = 7 [(google.api.field_behavior) = REQUIRED]; // Optional. Configuration related to the root volume provisioned for each @@ -197,10 +210,11 @@ message AwsControlPlane { AwsVolumeTemplate main_volume = 9 [(google.api.field_behavior) = OPTIONAL]; // Required. The ARN of the AWS KMS key used to encrypt cluster secrets. - AwsDatabaseEncryption database_encryption = 10 [(google.api.field_behavior) = REQUIRED]; + AwsDatabaseEncryption database_encryption = 10 + [(google.api.field_behavior) = REQUIRED]; - // Optional. A set of AWS resource tags to propagate to all underlying managed AWS - // resources. + // Optional. A set of AWS resource tags to propagate to all underlying managed + // AWS resources. // // Specify at most 50 pairs containing alphanumerics, spaces, and symbols // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to @@ -208,23 +222,26 @@ message AwsControlPlane { map tags = 11 [(google.api.field_behavior) = OPTIONAL]; // Required. Authentication configuration for management of AWS resources. - AwsServicesAuthentication aws_services_authentication = 12 [(google.api.field_behavior) = REQUIRED]; + AwsServicesAuthentication aws_services_authentication = 12 + [(google.api.field_behavior) = REQUIRED]; // Optional. Proxy configuration for outbound HTTP(S) traffic. AwsProxyConfig proxy_config = 16 [(google.api.field_behavior) = OPTIONAL]; // Required. Config encryption for user data. - AwsConfigEncryption config_encryption = 17 [(google.api.field_behavior) = REQUIRED]; + AwsConfigEncryption config_encryption = 17 + [(google.api.field_behavior) = REQUIRED]; // Optional. The placement to use on control plane instances. // When unspecified, the VPC's default tenancy will be used. - AwsInstancePlacement instance_placement = 18 [(google.api.field_behavior) = OPTIONAL]; + AwsInstancePlacement instance_placement = 18 + [(google.api.field_behavior) = OPTIONAL]; } // Authentication configuration for the management of AWS resources. message AwsServicesAuthentication { - // Required. The Amazon Resource Name (ARN) of the role that the Anthos Multi-Cloud API - // will assume when managing AWS resources on your account. + // Required. The Amazon Resource Name (ARN) of the role that the Anthos + // Multi-Cloud API will assume when managing AWS resources on your account. string role_arn = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. An identifier for the assumed role session. @@ -241,7 +258,8 @@ message AwsAuthorization { // // For more info on RBAC, see // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - repeated AwsClusterUser admin_users = 1 [(google.api.field_behavior) = REQUIRED]; + repeated AwsClusterUser admin_users = 1 + [(google.api.field_behavior) = REQUIRED]; } // Identities of a user-type subject for AWS clusters. @@ -284,11 +302,12 @@ message AwsVolumeTemplate { // When unspecified, it defaults to GP2 volume. VolumeType volume_type = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The number of I/O operations per second (IOPS) to provision for GP3 volume. + // Optional. The number of I/O operations per second (IOPS) to provision for + // GP3 volume. int32 iops = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) used to - // encrypt AWS EBS volumes. + // Optional. The Amazon Resource Name (ARN) of the Customer Managed Key (CMK) + // used to encrypt AWS EBS volumes. // // If not specified, the default Amazon managed key associated to // the AWS region where this cluster runs will be used. @@ -306,15 +325,17 @@ message AwsClusterNetworking { // This field cannot be changed after creation. string vpc_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. All pods in the cluster are assigned an IPv4 address from these ranges. - // Only a single range is supported. - // This field cannot be changed after creation. - repeated string pod_address_cidr_blocks = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. All services in the cluster are assigned an IPv4 address from these ranges. - // Only a single range is supported. - // This field cannot be changed after creation. - repeated string service_address_cidr_blocks = 3 [(google.api.field_behavior) = REQUIRED]; + // Required. All pods in the cluster are assigned an IPv4 address from these + // ranges. Only a single range is supported. This field cannot be changed + // after creation. + repeated string pod_address_cidr_blocks = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. All services in the cluster are assigned an IPv4 address from + // these ranges. Only a single range is supported. This field cannot be + // changed after creation. + repeated string service_address_cidr_blocks = 3 + [(google.api.field_behavior) = REQUIRED]; } // An Anthos node pool running on AWS. @@ -360,7 +381,8 @@ message AwsNodePool { // see [Resource Names](https://cloud.google.com/apis/design/resource_names) string name = 1; - // Required. The Kubernetes version to run on this node pool (e.g. `1.19.10-gke.1000`). + // Required. The Kubernetes version to run on this node pool (e.g. + // `1.19.10-gke.1000`). // // You can list all supported versions on a given Google Cloud region by // calling @@ -371,7 +393,8 @@ message AwsNodePool { AwsNodeConfig config = 28 [(google.api.field_behavior) = REQUIRED]; // Required. Autoscaler configuration for this node pool. - AwsNodePoolAutoscaling autoscaling = 25 [(google.api.field_behavior) = REQUIRED]; + AwsNodePoolAutoscaling autoscaling = 25 + [(google.api.field_behavior) = REQUIRED]; // Required. The subnet where the node pool node run. string subnet_id = 6 [(google.api.field_behavior) = REQUIRED]; @@ -387,10 +410,12 @@ message AwsNodePool { bool reconciling = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this node pool was created. - google.protobuf.Timestamp create_time = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this node pool was last updated. - google.protobuf.Timestamp update_time = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Allows clients to perform consistent read-modify-writes // through optimistic concurrency control. @@ -412,7 +437,12 @@ message AwsNodePool { // Required. The constraint on the maximum number of pods that can be run // simultaneously on a node in the node pool. - MaxPodsConstraint max_pods_constraint = 27 [(google.api.field_behavior) = REQUIRED]; + MaxPodsConstraint max_pods_constraint = 27 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. A set of errors found in the node pool. + repeated AwsNodePoolError errors = 29 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Parameters that describe the nodes in a cluster. @@ -437,13 +467,14 @@ message AwsNodeConfig { // "mass": "1.3kg", "count": "3" }. map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Key/value metadata to assign to each underlying AWS resource. Specify at - // most 50 pairs containing alphanumerics, spaces, and symbols (.+-=_:@/). - // Keys can be up to 127 Unicode characters. - // Values can be up to 255 Unicode characters. + // Optional. Key/value metadata to assign to each underlying AWS resource. + // Specify at most 50 pairs containing alphanumerics, spaces, and symbols + // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to + // 255 Unicode characters. map tags = 5 [(google.api.field_behavior) = OPTIONAL]; - // Required. The name or ARN of the AWS IAM role assigned to nodes in the pool. + // Required. The name or ARN of the AWS IAM role assigned to nodes in the + // pool. string iam_instance_profile = 6 [(google.api.field_behavior) = REQUIRED]; // Optional. The OS image type to use on node pool instances. @@ -456,31 +487,41 @@ message AwsNodeConfig { // Optional. The SSH configuration. AwsSshConfig ssh_config = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The IDs of additional security groups to add to nodes in this pool. The - // manager will automatically create security groups with minimum rules - // needed for a functioning cluster. - repeated string security_group_ids = 10 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The IDs of additional security groups to add to nodes in this + // pool. The manager will automatically create security groups with minimum + // rules needed for a functioning cluster. + repeated string security_group_ids = 10 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Proxy configuration for outbound HTTP(S) traffic. AwsProxyConfig proxy_config = 12 [(google.api.field_behavior) = OPTIONAL]; // Required. Config encryption for user data. - AwsConfigEncryption config_encryption = 13 [(google.api.field_behavior) = REQUIRED]; + AwsConfigEncryption config_encryption = 13 + [(google.api.field_behavior) = REQUIRED]; // Optional. Placement related info for this node. // When unspecified, the VPC's default tenancy will be used. - AwsInstancePlacement instance_placement = 14 [(google.api.field_behavior) = OPTIONAL]; + AwsInstancePlacement instance_placement = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration related to CloudWatch metrics collection on the + // Auto Scaling group of the node pool. + // + // When unspecified, metrics collection is disabled. + AwsAutoscalingGroupMetricsCollection autoscaling_metrics_collection = 15 + [(google.api.field_behavior) = OPTIONAL]; } // AwsNodePoolAutoscaling contains information required by cluster autoscaler // to adjust the size of the node pool to the current cluster usage. message AwsNodePoolAutoscaling { - // Required. Minimum number of nodes in the node pool. Must be greater than or equal to - // 1 and less than or equal to max_node_count. + // Required. Minimum number of nodes in the node pool. Must be greater than or + // equal to 1 and less than or equal to max_node_count. int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Maximum number of nodes in the node pool. Must be greater than or equal to - // min_node_count and less than or equal to 50. + // Required. Maximum number of nodes in the node pool. Must be greater than or + // equal to min_node_count and less than or equal to 50. int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -517,6 +558,10 @@ message AwsSshConfig { message AwsProxyConfig { // The ARN of the AWS Secret Manager secret that contains the HTTP(S) proxy // configuration. + // + // The secret must be a JSON encoded proxy configuration + // as described in + // https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file string secret_arn = 1; // The version string of the AWS Secret Manager secret that contains the @@ -554,3 +599,29 @@ message AwsInstancePlacement { // Required. The tenancy for instance. Tenancy tenancy = 1 [(google.api.field_behavior) = REQUIRED]; } + +// Configuration related to CloudWatch metrics collection in an AWS +// Auto Scaling group. +message AwsAutoscalingGroupMetricsCollection { + // Required. The frequency at which EC2 Auto Scaling sends aggregated data to + // AWS CloudWatch. The only valid value is "1Minute". + string granularity = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The metrics to enable. For a list of valid metrics, see + // https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html. + // If you specify Granularity and don't specify any metrics, all metrics are + // enabled. + repeated string metrics = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// AwsClusterError describes errors found on AWS clusters. +message AwsClusterError { + // Human-friendly description of the error. + string message = 1; +} + +// AwsNodePoolError describes errors found on AWS node pools. +message AwsNodePoolError { + // Human-friendly description of the error. + string message = 1; +} diff --git a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/aws_service.proto b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/aws_service.proto index d7f7144e5cb..cb1f3a41db3 100644 --- a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/aws_service.proto +++ b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/aws_service.proto @@ -37,14 +37,17 @@ option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; // to create and manage Anthos clusters that run on AWS infrastructure. service AwsClusters { option (google.api.default_host) = "gkemulticloud.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; - // Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region. + // Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource on a given GCP project and region. // // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc CreateAwsCluster(CreateAwsClusterRequest) returns (google.longrunning.Operation) { + rpc CreateAwsCluster(CreateAwsClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/awsClusters" body: "aws_cluster" @@ -57,7 +60,8 @@ service AwsClusters { } // Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - rpc UpdateAwsCluster(UpdateAwsClusterRequest) returns (google.longrunning.Operation) { + rpc UpdateAwsCluster(UpdateAwsClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{aws_cluster.name=projects/*/locations/*/awsClusters/*}" body: "aws_cluster" @@ -69,7 +73,8 @@ service AwsClusters { }; } - // Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + // Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource. rpc GetAwsCluster(GetAwsClusterRequest) returns (AwsCluster) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/awsClusters/*}" @@ -77,24 +82,27 @@ service AwsClusters { option (google.api.method_signature) = "name"; } - // Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and - // region. - rpc ListAwsClusters(ListAwsClustersRequest) returns (ListAwsClustersResponse) { + // Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + // on a given Google Cloud project and region. + rpc ListAwsClusters(ListAwsClustersRequest) + returns (ListAwsClustersResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/awsClusters" }; option (google.api.method_signature) = "parent"; } - // Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. + // Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource. // - // Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - // resources. + // Fails if the cluster has one or more associated + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. // // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc DeleteAwsCluster(DeleteAwsClusterRequest) returns (google.longrunning.Operation) { + rpc DeleteAwsCluster(DeleteAwsClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/awsClusters/*}" }; @@ -107,23 +115,27 @@ service AwsClusters { // Generates a short-lived access token to authenticate to a given // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. - rpc GenerateAwsAccessToken(GenerateAwsAccessTokenRequest) returns (GenerateAwsAccessTokenResponse) { + rpc GenerateAwsAccessToken(GenerateAwsAccessTokenRequest) + returns (GenerateAwsAccessTokenResponse) { option (google.api.http) = { get: "/v1/{aws_cluster=projects/*/locations/*/awsClusters/*}:generateAwsAccessToken" }; } - // Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + // Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], + // attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. // // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc CreateAwsNodePool(CreateAwsNodePoolRequest) returns (google.longrunning.Operation) { + rpc CreateAwsNodePool(CreateAwsNodePoolRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools" body: "aws_node_pool" }; - option (google.api.method_signature) = "parent,aws_node_pool,aws_node_pool_id"; + option (google.api.method_signature) = + "parent,aws_node_pool,aws_node_pool_id"; option (google.longrunning.operation_info) = { response_type: "AwsNodePool" metadata_type: "OperationMetadata" @@ -131,7 +143,8 @@ service AwsClusters { } // Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. - rpc UpdateAwsNodePool(UpdateAwsNodePoolRequest) returns (google.longrunning.Operation) { + rpc UpdateAwsNodePool(UpdateAwsNodePoolRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{aws_node_pool.name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" body: "aws_node_pool" @@ -143,7 +156,8 @@ service AwsClusters { }; } - // Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + // Describes a specific + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. rpc GetAwsNodePool(GetAwsNodePoolRequest) returns (AwsNodePool) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" @@ -151,20 +165,25 @@ service AwsClusters { option (google.api.method_signature) = "name"; } - // Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. - rpc ListAwsNodePools(ListAwsNodePoolsRequest) returns (ListAwsNodePoolsResponse) { + // Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resources on a given + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + rpc ListAwsNodePools(ListAwsNodePoolsRequest) + returns (ListAwsNodePoolsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/awsClusters/*}/awsNodePools" }; option (google.api.method_signature) = "parent"; } - // Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. + // Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resource. // // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc DeleteAwsNodePool(DeleteAwsNodePoolRequest) returns (google.longrunning.Operation) { + rpc DeleteAwsNodePool(DeleteAwsNodePoolRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/awsClusters/*/awsNodePools/*}" }; @@ -187,8 +206,9 @@ service AwsClusters { // Request message for `AwsClusters.CreateAwsCluster` method. message CreateAwsClusterRequest { - // Required. The parent location where this [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource - // will be created. + // Required. The parent location where this + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be + // created. // // Location names are formatted as `projects//locations/`. // @@ -201,17 +221,19 @@ message CreateAwsClusterRequest { } ]; - // Required. The specification of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. + // Required. The specification of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create. AwsCluster aws_cluster = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A client provided ID the resource. Must be unique within the parent - // resource. + // Required. A client provided ID the resource. Must be unique within the + // parent resource. // - // The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] - // resource name formatted as + // The provided ID will be part of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name + // formatted as // `projects//locations//awsClusters/`. // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. string aws_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but do not actually create the cluster. @@ -220,7 +242,8 @@ message CreateAwsClusterRequest { // Request message for `AwsClusters.UpdateAwsCluster` method. message UpdateAwsClusterRequest { - // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to update. + // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource to update. AwsCluster aws_cluster = 1 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but do not actually update the cluster. @@ -242,20 +265,26 @@ message UpdateAwsClusterRequest { // * `control_plane.proxy_config`. // * `control_plane.proxy_config.secret_arn`. // * `control_plane.proxy_config.secret_version`. + // * `control_plane.root_volume.size_gib`. + // * `control_plane.root_volume.volume_type`. // * `control_plane.root_volume.iops`. // * `control_plane.root_volume.kms_key_arn`. - // * `control_plane.root_volume.volume_type`. - // * `control_plane.root_volume.size_gib`. // * `control_plane.ssh_config`. // * `control_plane.ssh_config.ec2_key_pair`. // * `control_plane.instance_placement.tenancy`. - // * `logging_config`. - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; + // * `control_plane.iam_instance_profile`. + // * `logging_config.component_config.enable_components`. + // * `control_plane.tags`. + // * `monitoring_config.managed_prometheus_config.enabled`. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; } // Request message for `AwsClusters.GetAwsCluster` method. message GetAwsClusterRequest { - // Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to describe. + // Required. The name of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + // describe. // // `AwsCluster` names are formatted as // `projects//locations//awsClusters/`. @@ -291,19 +320,20 @@ message ListAwsClustersRequest { // If not specified, a default value of 50 will be used by the service. // Regardless of the pageSize value, the response can include a partial list // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] to determine if - // there are more instances left to be queried. + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token] + // to determine if there are more instances left to be queried. int32 page_size = 2; // The `nextPageToken` value returned from a previous - // [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] request, if any. + // [awsClusters.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters] + // request, if any. string page_token = 3; } // Response message for `AwsClusters.ListAwsClusters` method. message ListAwsClustersResponse { - // A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources in the specified GCP - // project and region region. + // A list of [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources + // in the specified GCP project and region region. repeated AwsCluster aws_clusters = 1; // Token to retrieve the next page of results, or empty if there are no more @@ -313,7 +343,8 @@ message ListAwsClustersResponse { // Request message for `AwsClusters.DeleteAwsCluster` method. message DeleteAwsClusterRequest { - // Required. The resource name the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. + // Required. The resource name the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete. // // `AwsCluster` names are formatted as // `projects//locations//awsClusters/`. @@ -330,14 +361,16 @@ message DeleteAwsClusterRequest { // If set, only validate the request, but do not actually delete the resource. bool validate_only = 2; - // If set to true, and the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not found, - // the request will succeed but no action will be taken on the server and a - // completed [Operation][google.longrunning.Operation] will be returned. + // If set to true, and the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource is not + // found, the request will succeed but no action will be taken on the server + // and a completed [Operation][google.longrunning.Operation] will be returned. // // Useful for idempotent deletion. bool allow_missing = 3; - // The current etag of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. + // The current etag of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. // // Allows clients to perform deletions through optimistic concurrency control. // @@ -348,7 +381,8 @@ message DeleteAwsClusterRequest { // Response message for `AwsClusters.CreateAwsNodePool` method. message CreateAwsNodePoolRequest { - // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource where this node pool will be created. + // Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] + // resource where this node pool will be created. // // `AwsCluster` names are formatted as // `projects//locations//awsClusters/`. @@ -362,17 +396,19 @@ message CreateAwsNodePoolRequest { } ]; - // Required. The specification of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. + // Required. The specification of the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create. AwsNodePool aws_node_pool = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A client provided ID the resource. Must be unique within the parent - // resource. + // Required. A client provided ID the resource. Must be unique within the + // parent resource. // - // The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] - // resource name formatted as + // The provided ID will be part of the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name + // formatted as // `projects//locations//awsClusters//awsNodePools/`. // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. string aws_node_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but do not actually create the node @@ -382,7 +418,8 @@ message CreateAwsNodePoolRequest { // Request message for `AwsClusters.UpdateAwsNodePool` method. message UpdateAwsNodePoolRequest { - // Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to update. + // Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resource to update. AwsNodePool aws_node_pool = 1 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but don't actually update the node pool. @@ -407,12 +444,22 @@ message UpdateAwsNodePoolRequest { // * `config.proxy_config.secret_version`. // * `config.ssh_config`. // * `config.ssh_config.ec2_key_pair`. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; + // * `config.instance_placement.tenancy`. + // * `config.iam_instance_profile`. + // * `config.labels`. + // * `config.tags`. + // * `config.autoscaling_metrics_collection`. + // * `config.autoscaling_metrics_collection.granularity`. + // * `config.autoscaling_metrics_collection.metrics`. + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = REQUIRED]; } // Request message for `AwsClusters.GetAwsNodePool` method. message GetAwsNodePoolRequest { - // Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to describe. + // Required. The name of the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource to + // describe. // // `AwsNodePool` names are formatted as // `projects//locations//awsClusters//awsNodePools/`. @@ -449,18 +496,20 @@ message ListAwsNodePoolsRequest { // If not specified, a default value of 50 will be used by the service. // Regardless of the pageSize value, the response can include a partial list // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] to determine if - // there are more instances left to be queried. + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token] + // to determine if there are more instances left to be queried. int32 page_size = 2; // The `nextPageToken` value returned from a previous - // [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] request, if any. + // [awsNodePools.list][google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools] + // request, if any. string page_token = 3; } // Response message for `AwsClusters.ListAwsNodePools` method. message ListAwsNodePoolsResponse { - // A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources in the specified `AwsCluster`. + // A list of [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] + // resources in the specified `AwsCluster`. repeated AwsNodePool aws_node_pools = 1; // Token to retrieve the next page of results, or empty if there are no more @@ -468,9 +517,10 @@ message ListAwsNodePoolsResponse { string next_page_token = 2; } -// Request message for `AwsClusters.DeleteNodePool` method. +// Request message for `AwsClusters.DeleteAwsNodePool` method. message DeleteAwsNodePoolRequest { - // Required. The resource name the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. + // Required. The resource name the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete. // // `AwsNodePool` names are formatted as // `projects//locations//awsClusters//awsNodePools/`. @@ -488,14 +538,16 @@ message DeleteAwsNodePoolRequest { // pool. bool validate_only = 2; - // If set to true, and the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not found, - // the request will succeed but no action will be taken on the server and a - // completed [Operation][google.longrunning.Operation] will be returned. + // If set to true, and the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource is not + // found, the request will succeed but no action will be taken on the server + // and a completed [Operation][google.longrunning.Operation] will be returned. // // Useful for idempotent deletion. bool allow_missing = 3; - // The current ETag of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. + // The current ETag of the + // [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]. // // Allows clients to perform deletions through optimistic concurrency control. // @@ -506,7 +558,9 @@ message DeleteAwsNodePoolRequest { // GetAwsServerConfigRequest gets the server config of GKE cluster on AWS. message GetAwsServerConfigRequest { - // Required. The name of the [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe. + // Required. The name of the + // [AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource + // to describe. // // `AwsServerConfig` names are formatted as // `projects//locations//awsServerConfig`. @@ -523,7 +577,9 @@ message GetAwsServerConfigRequest { // Request message for `AwsClusters.GenerateAwsAccessToken` method. message GenerateAwsAccessTokenRequest { - // Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to authenticate to. + // Required. The name of the + // [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource to + // authenticate to. // // `AwsCluster` names are formatted as // `projects//locations//awsClusters/`. @@ -544,5 +600,6 @@ message GenerateAwsAccessTokenResponse { string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp at which the token will expire. - google.protobuf.Timestamp expiration_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expiration_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/azure_resources.proto b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/azure_resources.proto index 3548c6ac8c5..b6750d76423 100644 --- a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/azure_resources.proto +++ b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/azure_resources.proto @@ -85,13 +85,15 @@ message AzureCluster { // to list all supported Azure regions within a given Google Cloud region. string azure_region = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. The ARM ID of the resource group where the cluster resources are deployed. - // For example: + // Required. The ARM ID of the resource group where the cluster resources are + // deployed. For example: // `/subscriptions//resourceGroups/` string resource_group_id = 17 [(google.api.field_behavior) = REQUIRED]; - // Required. Name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains authentication configuration for - // how the Anthos Multi-Cloud API connects to Azure APIs. + // Required. Name of the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] that contains + // authentication configuration for how the Anthos Multi-Cloud API connects to + // Azure APIs. // // The `AzureClient` resource must reside on the same GCP project and region // as the `AzureCluster`. @@ -104,7 +106,8 @@ message AzureCluster { string azure_client = 16 [(google.api.field_behavior) = REQUIRED]; // Required. Cluster-wide networking configuration. - AzureClusterNetworking networking = 4 [(google.api.field_behavior) = REQUIRED]; + AzureClusterNetworking networking = 4 + [(google.api.field_behavior) = REQUIRED]; // Required. Configuration related to the cluster control plane. AzureControlPlane control_plane = 5 [(google.api.field_behavior) = REQUIRED]; @@ -125,10 +128,12 @@ message AzureCluster { bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this cluster was created. - google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this cluster was last updated. - google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Allows clients to perform consistent read-modify-writes // through optimistic concurrency control. @@ -149,25 +154,36 @@ message AzureCluster { map annotations = 14 [(google.api.field_behavior) = OPTIONAL]; // Output only. Workload Identity settings. - WorkloadIdentityConfig workload_identity_config = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + WorkloadIdentityConfig workload_identity_config = 18 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. PEM encoded x509 certificate of the cluster root of trust. - string cluster_ca_certificate = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + string cluster_ca_certificate = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Fleet configuration. - Fleet fleet = 20 [(google.api.field_behavior) = OPTIONAL]; + // Required. Fleet configuration. + Fleet fleet = 20 [(google.api.field_behavior) = REQUIRED]; - // Output only. Mananged Azure resources for this cluster. - AzureClusterResources managed_resources = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Managed Azure resources for this cluster. + AzureClusterResources managed_resources = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Logging configuration for this cluster. LoggingConfig logging_config = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A set of errors found in the cluster. + repeated AzureClusterError errors = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Monitoring configuration for this cluster. + MonitoringConfig monitoring_config = 25 + [(google.api.field_behavior) = OPTIONAL]; } // ClusterNetworking contains cluster-wide networking configuration. message AzureClusterNetworking { - // Required. The Azure Resource Manager (ARM) ID of the VNet associated with your - // cluster. + // Required. The Azure Resource Manager (ARM) ID of the VNet associated with + // your cluster. // // All components in the cluster (i.e. control plane and node pools) run on a // single VNet. @@ -185,7 +201,8 @@ message AzureClusterNetworking { // ranges. Only a single range is supported. // // This field cannot be changed after creation. - repeated string pod_address_cidr_blocks = 2 [(google.api.field_behavior) = REQUIRED]; + repeated string pod_address_cidr_blocks = 2 + [(google.api.field_behavior) = REQUIRED]; // Required. The IP address range for services in this cluster, in CIDR // notation (e.g. `10.96.0.0/14`). @@ -194,15 +211,17 @@ message AzureClusterNetworking { // ranges. Only a single range is supported. // // This field cannot be changed after creating a cluster. - repeated string service_address_cidr_blocks = 3 [(google.api.field_behavior) = REQUIRED]; + repeated string service_address_cidr_blocks = 3 + [(google.api.field_behavior) = REQUIRED]; - // Optional. The ARM ID of the subnet where Kubernetes private service type load - // balancers are deployed. When unspecified, it defaults to + // Optional. The ARM ID of the subnet where Kubernetes private service type + // load balancers are deployed. When unspecified, it defaults to // AzureControlPlane.subnet_id. // // Example: // "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid456" - string service_load_balancer_subnet_id = 5 [(google.api.field_behavior) = OPTIONAL]; + string service_load_balancer_subnet_id = 5 + [(google.api.field_behavior) = OPTIONAL]; } // AzureControlPlane represents the control plane configurations. @@ -215,8 +234,8 @@ message AzureControlPlane { // [GetAzureServerConfig][google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig]. string version = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The ARM ID of the default subnet for the control plane. The control plane - // VMs are deployed in this subnet, unless + // Optional. The ARM ID of the default subnet for the control plane. The + // control plane VMs are deployed in this subnet, unless // `AzureControlPlane.replica_placements` is specified. This subnet will also // be used as default for `AzureControlPlane.endpoint_subnet_id` if // `AzureControlPlane.endpoint_subnet_id` is not specified. Similarly it will @@ -253,15 +272,18 @@ message AzureControlPlane { AzureDiskTemplate main_volume = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration related to application-layer secrets encryption. - AzureDatabaseEncryption database_encryption = 10 [(google.api.field_behavior) = OPTIONAL]; + AzureDatabaseEncryption database_encryption = 10 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Proxy configuration for outbound HTTP(S) traffic. AzureProxyConfig proxy_config = 12 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration related to vm config encryption. - AzureConfigEncryption config_encryption = 14 [(google.api.field_behavior) = OPTIONAL]; + AzureConfigEncryption config_encryption = 14 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. A set of tags to apply to all underlying control plane Azure resources. + // Optional. A set of tags to apply to all underlying control plane Azure + // resources. map tags = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration for where to place the control plane replicas. @@ -269,10 +291,11 @@ message AzureControlPlane { // Up to three replica placement instances can be specified. If // replica_placements is set, the replica placement instances will be applied // to the three control plane replicas as evenly as possible. - repeated ReplicaPlacement replica_placements = 13 [(google.api.field_behavior) = OPTIONAL]; + repeated ReplicaPlacement replica_placements = 13 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. The ARM ID of the subnet where the control plane load balancer is deployed. - // When unspecified, it defaults to AzureControlPlane.subnet_id. + // Optional. The ARM ID of the subnet where the control plane load balancer is + // deployed. When unspecified, it defaults to AzureControlPlane.subnet_id. // // Example: // "/subscriptions/d00494d6-6f3c-4280-bbb2-899e163d1d30/resourceGroups/anthos_cluster_gkeust4/providers/Microsoft.Network/virtualNetworks/gke-vnet-gkeust4/subnets/subnetid123" @@ -281,13 +304,13 @@ message AzureControlPlane { // Configuration for the placement of a control plane replica. message ReplicaPlacement { - // Required. For a given replica, the ARM ID of the subnet where the control plane VM is - // deployed. Make sure it's a subnet under the virtual network in the cluster - // configuration. + // Required. For a given replica, the ARM ID of the subnet where the control + // plane VM is deployed. Make sure it's a subnet under the virtual network in + // the cluster configuration. string subnet_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. For a given replica, the Azure availability zone where to provision the - // control plane VM and the ETCD disk. + // Required. For a given replica, the Azure availability zone where to + // provision the control plane VM and the ETCD disk. string azure_availability_zone = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -301,6 +324,10 @@ message AzureProxyConfig { // The URL the of the proxy setting secret with its version. // + // The secret must be a JSON encoded proxy configuration + // as described in + // https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file + // // Secret ids are formatted as // `https://.vault.azure.net/secrets//`. string secret_id = 2; @@ -325,13 +352,15 @@ message AzureDatabaseEncryption { // Azure VM bootstrap secret is envelope encrypted with the provided key vault // key. message AzureConfigEncryption { - // Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config data. + // Required. The ARM ID of the Azure Key Vault key to encrypt / decrypt config + // data. // // For example: // `/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults//keys/` string key_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. RSA key of the Azure Key Vault public key to use for encrypting the data. + // Optional. RSA key of the Azure Key Vault public key to use for encrypting + // the data. // // This key must be formatted as a PEM-encoded SubjectPublicKeyInfo (RFC 5280) // in ASN.1 DER form. The string must be comprised of a single PEM block of @@ -351,9 +380,10 @@ message AzureDiskTemplate { // `AzureClient` resources hold client authentication information needed by the // Anthos Multi-Cloud API to manage Azure resources on your Azure subscription. // -// When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is created, an `AzureClient` resource needs to be -// provided and all operations on Azure resources associated to that cluster -// will authenticate to Azure services using the given client. +// When an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] is +// created, an `AzureClient` resource needs to be provided and all operations on +// Azure resources associated to that cluster will authenticate to Azure +// services using the given client. // // `AzureClient` resources are immutable and cannot be modified upon creation. // @@ -398,7 +428,8 @@ message AzureClient { string uid = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this resource was created. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Configuration related to the cluster RBAC settings. @@ -409,7 +440,8 @@ message AzureAuthorization { // // For more info on RBAC, see // https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles - repeated AzureClusterUser admin_users = 1 [(google.api.field_behavior) = REQUIRED]; + repeated AzureClusterUser admin_users = 1 + [(google.api.field_behavior) = REQUIRED]; } // Identities of a user-type subject for Azure clusters. @@ -461,18 +493,20 @@ message AzureNodePool { // see [Resource Names](https://cloud.google.com/apis/design/resource_names) string name = 1; - // Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool. + // Required. The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this + // node pool. string version = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The node configuration of the node pool. AzureNodeConfig config = 22 [(google.api.field_behavior) = REQUIRED]; - // Required. The ARM ID of the subnet where the node pool VMs run. Make sure it's a - // subnet under the virtual network in the cluster configuration. + // Required. The ARM ID of the subnet where the node pool VMs run. Make sure + // it's a subnet under the virtual network in the cluster configuration. string subnet_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. Autoscaler configuration for this node pool. - AzureNodePoolAutoscaling autoscaling = 4 [(google.api.field_behavior) = REQUIRED]; + AzureNodePoolAutoscaling autoscaling = 4 + [(google.api.field_behavior) = REQUIRED]; // Output only. The current state of the node pool. State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -485,10 +519,12 @@ message AzureNodePool { bool reconciling = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this node pool was created. - google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this node pool was last updated. - google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Allows clients to perform consistent read-modify-writes // through optimistic concurrency control. @@ -510,12 +546,17 @@ message AzureNodePool { // Required. The constraint on the maximum number of pods that can be run // simultaneously on a node in the node pool. - MaxPodsConstraint max_pods_constraint = 21 [(google.api.field_behavior) = REQUIRED]; + MaxPodsConstraint max_pods_constraint = 21 + [(google.api.field_behavior) = REQUIRED]; // Optional. The Azure availability zone of the nodes in this nodepool. // // When unspecified, it defaults to `1`. string azure_availability_zone = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. A set of errors found in the node pool. + repeated AzureNodePoolError errors = 29 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Parameters that describe the configuration of all node machines @@ -535,8 +576,8 @@ message AzureNodeConfig { // When unspecified, it defaults to a 32-GiB Azure Disk. AzureDiskTemplate root_volume = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A set of tags to apply to all underlying Azure resources for this node - // pool. This currently only includes Virtual Machine Scale Sets. + // Optional. A set of tags to apply to all underlying Azure resources for this + // node pool. This currently only includes Virtual Machine Scale Sets. // // Specify at most 50 pairs containing alphanumerics, spaces, and symbols // (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to @@ -557,7 +598,8 @@ message AzureNodeConfig { AzureProxyConfig proxy_config = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration related to vm config encryption. - AzureConfigEncryption config_encryption = 12 [(google.api.field_behavior) = OPTIONAL]; + AzureConfigEncryption config_encryption = 12 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The initial taints assigned to nodes of this node pool. repeated NodeTaint taints = 10 [(google.api.field_behavior) = OPTIONAL]; @@ -573,12 +615,12 @@ message AzureNodeConfig { // The Kubernetes cluster autoscaler will automatically adjust the // size of the node pool based on the cluster load. message AzureNodePoolAutoscaling { - // Required. Minimum number of nodes in the node pool. Must be greater than or equal to - // 1 and less than or equal to max_node_count. + // Required. Minimum number of nodes in the node pool. Must be greater than or + // equal to 1 and less than or equal to max_node_count. int32 min_node_count = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Maximum number of nodes in the node pool. Must be greater than or equal to - // min_node_count and less than or equal to 50. + // Required. Maximum number of nodes in the node pool. Must be greater than or + // equal to min_node_count and less than or equal to 50. int32 max_node_count = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -614,9 +656,9 @@ message AzureK8sVersionInfo { // SSH configuration for Azure resources. message AzureSshConfig { - // Required. The SSH public key data for VMs managed by Anthos. This accepts the - // authorized_keys file format used in OpenSSH according to the sshd(8) manual - // page. + // Required. The SSH public key data for VMs managed by Anthos. This accepts + // the authorized_keys file format used in OpenSSH according to the sshd(8) + // manual page. string authorized_key = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -625,8 +667,22 @@ message AzureSshConfig { // The values could change and be empty, depending on the state of the cluster. message AzureClusterResources { // Output only. The ARM ID of the cluster network security group. - string network_security_group_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string network_security_group_id = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The ARM ID of the control plane application security group. - string control_plane_application_security_group_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + string control_plane_application_security_group_id = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AzureClusterError describes errors found on Azure clusters. +message AzureClusterError { + // Human-friendly description of the error. + string message = 1; +} + +// AzureNodePoolError describes errors found on Azure node pools. +message AzureNodePoolError { + // Human-friendly description of the error. + string message = 1; } diff --git a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/azure_service.proto b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/azure_service.proto index aed6420f79a..2593468ad42 100644 --- a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/azure_service.proto +++ b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/azure_service.proto @@ -37,10 +37,11 @@ option ruby_package = "Google::Cloud::GkeMultiCloud::V1"; // to create and manage Anthos clusters that run on Azure infrastructure. service AzureClusters { option (google.api.default_host) = "gkemulticloud.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; - // Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project - // and region. + // Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resource on a given Google Cloud project and region. // // `AzureClient` resources hold client authentication // information needed by the Anthos Multicloud API to manage Azure resources @@ -49,19 +50,22 @@ service AzureClusters { // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc CreateAzureClient(CreateAzureClientRequest) returns (google.longrunning.Operation) { + rpc CreateAzureClient(CreateAzureClientRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/azureClients" body: "azure_client" }; - option (google.api.method_signature) = "parent,azure_client,azure_client_id"; + option (google.api.method_signature) = + "parent,azure_client,azure_client_id"; option (google.longrunning.operation_info) = { response_type: "AzureClient" metadata_type: "OperationMetadata" }; } - // Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + // Describes a specific + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. rpc GetAzureClient(GetAzureClientRequest) returns (AzureClient) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/azureClients/*}" @@ -69,16 +73,18 @@ service AzureClusters { option (google.api.method_signature) = "name"; } - // Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and - // region. - rpc ListAzureClients(ListAzureClientsRequest) returns (ListAzureClientsResponse) { + // Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resources on a given Google Cloud project and region. + rpc ListAzureClients(ListAzureClientsRequest) + returns (ListAzureClientsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/azureClients" }; option (google.api.method_signature) = "parent"; } - // Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. + // Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resource. // // If the client is used by one or more clusters, deletion will // fail and a `FAILED_PRECONDITION` error will be returned. @@ -86,7 +92,8 @@ service AzureClusters { // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc DeleteAzureClient(DeleteAzureClientRequest) returns (google.longrunning.Operation) { + rpc DeleteAzureClient(DeleteAzureClientRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/azureClients/*}" }; @@ -97,17 +104,20 @@ service AzureClusters { }; } - // Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region. + // Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resource on a given GCP project and region. // // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc CreateAzureCluster(CreateAzureClusterRequest) returns (google.longrunning.Operation) { + rpc CreateAzureCluster(CreateAzureClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/azureClusters" body: "azure_cluster" }; - option (google.api.method_signature) = "parent,azure_cluster,azure_cluster_id"; + option (google.api.method_signature) = + "parent,azure_cluster,azure_cluster_id"; option (google.longrunning.operation_info) = { response_type: "AzureCluster" metadata_type: "OperationMetadata" @@ -115,7 +125,8 @@ service AzureClusters { } // Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - rpc UpdateAzureCluster(UpdateAzureClusterRequest) returns (google.longrunning.Operation) { + rpc UpdateAzureCluster(UpdateAzureClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{azure_cluster.name=projects/*/locations/*/azureClusters/*}" body: "azure_cluster" @@ -127,7 +138,8 @@ service AzureClusters { }; } - // Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + // Describes a specific + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. rpc GetAzureCluster(GetAzureClusterRequest) returns (AzureCluster) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/azureClusters/*}" @@ -135,24 +147,27 @@ service AzureClusters { option (google.api.method_signature) = "name"; } - // Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and - // region. - rpc ListAzureClusters(ListAzureClustersRequest) returns (ListAzureClustersResponse) { + // Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resources on a given Google Cloud project and region. + rpc ListAzureClusters(ListAzureClustersRequest) + returns (ListAzureClustersResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/azureClusters" }; option (google.api.method_signature) = "parent"; } - // Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. + // Deletes a specific + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. // - // Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - // resources. + // Fails if the cluster has one or more associated + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. // // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc DeleteAzureCluster(DeleteAzureClusterRequest) returns (google.longrunning.Operation) { + rpc DeleteAzureCluster(DeleteAzureClusterRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/azureClusters/*}" }; @@ -165,23 +180,28 @@ service AzureClusters { // Generates a short-lived access token to authenticate to a given // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. - rpc GenerateAzureAccessToken(GenerateAzureAccessTokenRequest) returns (GenerateAzureAccessTokenResponse) { + rpc GenerateAzureAccessToken(GenerateAzureAccessTokenRequest) + returns (GenerateAzureAccessTokenResponse) { option (google.api.http) = { get: "/v1/{azure_cluster=projects/*/locations/*/azureClusters/*}:generateAzureAccessToken" }; } - // Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + // Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], + // attached to a given + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. // // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc CreateAzureNodePool(CreateAzureNodePoolRequest) returns (google.longrunning.Operation) { + rpc CreateAzureNodePool(CreateAzureNodePoolRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools" body: "azure_node_pool" }; - option (google.api.method_signature) = "parent,azure_node_pool,azure_node_pool_id"; + option (google.api.method_signature) = + "parent,azure_node_pool,azure_node_pool_id"; option (google.longrunning.operation_info) = { response_type: "AzureNodePool" metadata_type: "OperationMetadata" @@ -189,7 +209,8 @@ service AzureClusters { } // Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. - rpc UpdateAzureNodePool(UpdateAzureNodePoolRequest) returns (google.longrunning.Operation) { + rpc UpdateAzureNodePool(UpdateAzureNodePoolRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{azure_node_pool.name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" body: "azure_node_pool" @@ -201,7 +222,8 @@ service AzureClusters { }; } - // Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + // Describes a specific + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. rpc GetAzureNodePool(GetAzureNodePoolRequest) returns (AzureNodePool) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" @@ -209,20 +231,25 @@ service AzureClusters { option (google.api.method_signature) = "name"; } - // Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. - rpc ListAzureNodePools(ListAzureNodePoolsRequest) returns (ListAzureNodePoolsResponse) { + // Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + // resources on a given + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + rpc ListAzureNodePools(ListAzureNodePoolsRequest) + returns (ListAzureNodePoolsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/azureClusters/*}/azureNodePools" }; option (google.api.method_signature) = "parent"; } - // Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. + // Deletes a specific + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. // // If successful, the response contains a newly created // [Operation][google.longrunning.Operation] resource that can be // described to track the status of the operation. - rpc DeleteAzureNodePool(DeleteAzureNodePoolRequest) returns (google.longrunning.Operation) { + rpc DeleteAzureNodePool(DeleteAzureNodePoolRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/azureClusters/*/azureNodePools/*}" }; @@ -235,7 +262,8 @@ service AzureClusters { // Returns information, such as supported Azure regions and Kubernetes // versions, on a given Google Cloud location. - rpc GetAzureServerConfig(GetAzureServerConfigRequest) returns (AzureServerConfig) { + rpc GetAzureServerConfig(GetAzureServerConfigRequest) + returns (AzureServerConfig) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/azureServerConfig}" }; @@ -245,8 +273,9 @@ service AzureClusters { // Request message for `AzureClusters.CreateAzureCluster` method. message CreateAzureClusterRequest { - // Required. The parent location where this [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource - // will be created. + // Required. The parent location where this + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will be + // created. // // Location names are formatted as `projects//locations/`. // @@ -259,17 +288,19 @@ message CreateAzureClusterRequest { } ]; - // Required. The specification of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. + // Required. The specification of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create. AzureCluster azure_cluster = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A client provided ID the resource. Must be unique within the parent - // resource. + // Required. A client provided ID the resource. Must be unique within the + // parent resource. // - // The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] - // resource name formatted as + // The provided ID will be part of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name + // formatted as // `projects//locations//azureClusters/`. // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. string azure_cluster_id = 3 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but do not actually create the cluster. @@ -278,7 +309,8 @@ message CreateAzureClusterRequest { // Request message for `AzureClusters.UpdateAzureCluster` method. message UpdateAzureClusterRequest { - // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to update. + // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resource to update. AzureCluster azure_cluster = 1 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but do not actually update the cluster. @@ -289,19 +321,27 @@ message UpdateAzureClusterRequest { // fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: // // * `description`. - // * `annotations`. // * `azureClient`. // * `control_plane.version`. // * `control_plane.vm_size`. + // * `annotations`. // * `authorization.admin_users`. // * `control_plane.root_volume.size_gib`. - // * `logging_config` - google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; + // * `control_plane.proxy_config`. + // * `control_plane.proxy_config.resource_group_id`. + // * `control_plane.proxy_config.secret_id`. + // * `control_plane.ssh_config.authorized_key`. + // * `logging_config.component_config.enable_components` + // * `monitoring_config.managed_prometheus_config.enabled`. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; } // Request message for `AzureClusters.GetAzureCluster` method. message GetAzureClusterRequest { - // Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe. + // Required. The name of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + // describe. // // `AzureCluster` names are formatted as // `projects//locations//azureClusters/`. @@ -337,19 +377,20 @@ message ListAzureClustersRequest { // If not specified, a default value of 50 will be used by the service. // Regardless of the pageSize value, the response can include a partial list // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] to determine if - // there are more instances left to be queried. + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token] + // to determine if there are more instances left to be queried. int32 page_size = 2; // The `nextPageToken` value returned from a previous - // [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] request, if any. + // [azureClusters.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters] + // request, if any. string page_token = 3; } // Response message for `AzureClusters.ListAzureClusters` method. message ListAzureClustersResponse { - // A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources in the specified GCP - // project and region region. + // A list of [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resources in the specified GCP project and region region. repeated AzureCluster azure_clusters = 1; // Token to retrieve the next page of results, or empty if there are no more @@ -359,7 +400,8 @@ message ListAzureClustersResponse { // Request message for `Clusters.DeleteAzureCluster` method. message DeleteAzureClusterRequest { - // Required. The resource name the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. + // Required. The resource name the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete. // // `AzureCluster` names are formatted as // `projects//locations//azureClusters/`. @@ -373,9 +415,10 @@ message DeleteAzureClusterRequest { } ]; - // If set to true, and the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not found, - // the request will succeed but no action will be taken on the server and a - // completed [Operation][google.longrunning.Operation] will be returned. + // If set to true, and the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource is not + // found, the request will succeed but no action will be taken on the server + // and a completed [Operation][google.longrunning.Operation] will be returned. // // Useful for idempotent deletion. bool allow_missing = 2; @@ -383,7 +426,8 @@ message DeleteAzureClusterRequest { // If set, only validate the request, but do not actually delete the resource. bool validate_only = 3; - // The current etag of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. + // The current etag of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. // // Allows clients to perform deletions through optimistic concurrency control. // @@ -394,7 +438,8 @@ message DeleteAzureClusterRequest { // Response message for `AzureClusters.CreateAzureNodePool` method. message CreateAzureNodePoolRequest { - // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource where this node pool will be created. + // Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] + // resource where this node pool will be created. // // Location names are formatted as `projects//locations/`. // @@ -407,17 +452,19 @@ message CreateAzureNodePoolRequest { } ]; - // Required. The specification of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. + // Required. The specification of the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create. AzureNodePool azure_node_pool = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A client provided ID the resource. Must be unique within the parent - // resource. + // Required. A client provided ID the resource. Must be unique within the + // parent resource. // - // The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] - // resource name formatted as + // The provided ID will be part of the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name + // formatted as // `projects//locations//azureClusters//azureNodePools/`. // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. string azure_node_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but do not actually create the node @@ -427,7 +474,8 @@ message CreateAzureNodePoolRequest { // Request message for `AzureClusters.UpdateAzureNodePool` method. message UpdateAzureNodePoolRequest { - // Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to update. + // Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + // resource to update. AzureNodePool azure_node_pool = 1 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but don't actually update the node pool. @@ -441,13 +489,16 @@ message UpdateAzureNodePoolRequest { // * `version`. // * `autoscaling.min_node_count`. // * `autoscaling.max_node_count`. - // * `config.vm_size`. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; + // * `config.ssh_config.authorized_key`. + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = REQUIRED]; } // Request message for `AzureClusters.GetAzureNodePool` method. message GetAzureNodePoolRequest { - // Required. The name of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe. + // Required. The name of the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to + // describe. // // `AzureNodePool` names are formatted as // `projects//locations//azureClusters//azureNodePools/`. @@ -484,18 +535,20 @@ message ListAzureNodePoolsRequest { // If not specified, a default value of 50 will be used by the service. // Regardless of the pageSize value, the response can include a partial list // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] to determine if - // there are more instances left to be queried. + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token] + // to determine if there are more instances left to be queried. int32 page_size = 2; // The `nextPageToken` value returned from a previous - // [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] request, if any. + // [azureNodePools.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools] + // request, if any. string page_token = 3; } // Response message for `AzureClusters.ListAzureNodePools` method. message ListAzureNodePoolsResponse { - // A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources in the specified `AzureCluster`. + // A list of [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] + // resources in the specified `AzureCluster`. repeated AzureNodePool azure_node_pools = 1; // Token to retrieve the next page of results, or empty if there are no more @@ -503,9 +556,10 @@ message ListAzureNodePoolsResponse { string next_page_token = 2; } -// Delete message for `AzureClusters.DeleteNodePool` method. +// Delete message for `AzureClusters.DeleteAzureNodePool` method. message DeleteAzureNodePoolRequest { - // Required. The resource name the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. + // Required. The resource name the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete. // // `AzureNodePool` names are formatted as // `projects//locations//azureClusters//azureNodePools/`. @@ -523,14 +577,17 @@ message DeleteAzureNodePoolRequest { // pool. bool validate_only = 2; - // If set to true, and the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is not found, - // the request will succeed but no action will be taken on the server and a - // completed [Operation][google.longrunning.Operation] will be returned. + // If set to true, and the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource is + // not found, the request will succeed but no action will be taken on the + // server and a completed [Operation][google.longrunning.Operation] will be + // returned. // // Useful for idempotent deletion. bool allow_missing = 3; - // The current ETag of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. + // The current ETag of the + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]. // // Allows clients to perform deletions through optimistic concurrency control. // @@ -541,7 +598,9 @@ message DeleteAzureNodePoolRequest { // GetAzureServerConfigRequest gets the server config of GKE cluster on Azure. message GetAzureServerConfigRequest { - // Required. The name of the [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe. + // Required. The name of the + // [AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] + // resource to describe. // // `AzureServerConfig` names are formatted as // `projects//locations//azureServerConfig`. @@ -558,8 +617,9 @@ message GetAzureServerConfigRequest { // Request message for `AzureClusters.CreateAzureClient` method. message CreateAzureClientRequest { - // Required. The parent location where this [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource - // will be created. + // Required. The parent location where this + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource will be + // created. // // Location names are formatted as `projects//locations/`. // @@ -572,17 +632,19 @@ message CreateAzureClientRequest { } ]; - // Required. The specification of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. + // Required. The specification of the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create. AzureClient azure_client = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A client provided ID the resource. Must be unique within the parent - // resource. + // Required. A client provided ID the resource. Must be unique within the + // parent resource. // - // The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] - // resource name formatted as + // The provided ID will be part of the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name + // formatted as // `projects//locations//azureClients/`. // - // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + // Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. string azure_client_id = 4 [(google.api.field_behavior) = REQUIRED]; // If set, only validate the request, but do not actually create the client. @@ -591,9 +653,12 @@ message CreateAzureClientRequest { // Request message for `AzureClusters.GetAzureClient` method. message GetAzureClientRequest { - // Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to describe. + // Required. The name of the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource to + // describe. // - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + // formatted as // `projects//locations//azureClients/`. // // See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -627,19 +692,20 @@ message ListAzureClientsRequest { // If not specified, a default value of 50 will be used by the service. // Regardless of the pageSize value, the response can include a partial list // and a caller should only rely on response's - // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] to determine if - // there are more instances left to be queried. + // [nextPageToken][google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token] + // to determine if there are more instances left to be queried. int32 page_size = 2; // The `nextPageToken` value returned from a previous - // [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] request, if any. + // [azureClients.list][google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients] + // request, if any. string page_token = 3; } // Response message for `AzureClusters.ListAzureClients` method. message ListAzureClientsResponse { - // A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources in the specified Google Cloud - // project and region region. + // A list of [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] + // resources in the specified Google Cloud project and region region. repeated AzureClient azure_clients = 1; // Token to retrieve the next page of results, or empty if there are no more @@ -649,9 +715,11 @@ message ListAzureClientsResponse { // Request message for `AzureClusters.DeleteAzureClient` method. message DeleteAzureClientRequest { - // Required. The resource name the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. + // Required. The resource name the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete. // - // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are + // formatted as // `projects//locations//azureClients/`. // // See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -663,9 +731,10 @@ message DeleteAzureClientRequest { } ]; - // If set to true, and the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not found, - // the request will succeed but no action will be taken on the server and a - // completed [Operation][google.longrunning.Operation] will be returned. + // If set to true, and the + // [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource is not + // found, the request will succeed but no action will be taken on the server + // and a completed [Operation][google.longrunning.Operation] will be returned. // // Useful for idempotent deletion. bool allow_missing = 2; @@ -676,7 +745,9 @@ message DeleteAzureClientRequest { // Request message for `AzureClusters.GenerateAzureAccessToken` method. message GenerateAzureAccessTokenRequest { - // Required. The name of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to authenticate to. + // Required. The name of the + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to + // authenticate to. // // `AzureCluster` names are formatted as // `projects//locations//AzureClusters/`. @@ -697,5 +768,6 @@ message GenerateAzureAccessTokenResponse { string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp at which the token will expire. - google.protobuf.Timestamp expiration_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expiration_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/common_resources.proto b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/common_resources.proto index 2a8e1bcd274..ba34f50b4c5 100644 --- a/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/common_resources.proto +++ b/packages/google-cloud-gkemulticloud/protos/google/cloud/gkemulticloud/v1/common_resources.proto @@ -49,10 +49,12 @@ message MaxPodsConstraint { // Metadata about a long-running operation. message OperationMetadata { // Output only. The time at which this operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this operation was completed. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the resource associated to this operation. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -60,8 +62,20 @@ message OperationMetadata { // Output only. Human-readable status of the operation, if any. string status_detail = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Human-readable status of any error that occurred during the operation. + // Output only. Human-readable status of any error that occurred during the + // operation. string error_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The verb associated with the API method which triggered this + // operation. Possible values are "create", "delete", "update" and "import". + string verb = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether it has been requested cancellation + // for 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]; } // The taint content for the node taint. @@ -107,13 +121,15 @@ message NodeTaint { // Fleets](https://cloud.google.com/anthos/multicluster-management/fleets) for // more details on Anthos multi-cluster capabilities using Fleets. message Fleet { - // Required. The name of the Fleet host project where this cluster will be registered. + // Required. The name of the Fleet host project where this cluster will be + // registered. // // Project names are formatted as // `projects/`. string project = 1 [(google.api.field_behavior) = REQUIRED]; - // Output only. The name of the managed Hub Membership resource associated to this cluster. + // Output only. The name of the managed Hub Membership resource associated to + // this cluster. // // Membership names are formatted as // `projects//locations/global/membership/`. @@ -143,3 +159,16 @@ message LoggingComponentConfig { // The components to be enabled. repeated Component enable_components = 1; } + +// Parameters that describe the Monitoring configuration in a cluster. +message MonitoringConfig { + // Enable Google Cloud Managed Service for Prometheus in the cluster. + ManagedPrometheusConfig managed_prometheus_config = 2; +} + +// ManagedPrometheusConfig defines the configuration for +// Google Cloud Managed Service for Prometheus. +message ManagedPrometheusConfig { + // Enable Managed Collection. + bool enabled = 1; +} diff --git a/packages/google-cloud-gkemulticloud/protos/protos.d.ts b/packages/google-cloud-gkemulticloud/protos/protos.d.ts index 0b41cef7ccd..79d51e6d1ee 100644 --- a/packages/google-cloud-gkemulticloud/protos/protos.d.ts +++ b/packages/google-cloud-gkemulticloud/protos/protos.d.ts @@ -26,206 +26,218 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** Properties of an AwsCluster. */ - interface IAwsCluster { + /** Properties of an AttachedCluster. */ + interface IAttachedCluster { - /** AwsCluster name */ + /** AttachedCluster name */ name?: (string|null); - /** AwsCluster description */ + /** AttachedCluster description */ description?: (string|null); - /** AwsCluster networking */ - networking?: (google.cloud.gkemulticloud.v1.IAwsClusterNetworking|null); + /** AttachedCluster oidcConfig */ + oidcConfig?: (google.cloud.gkemulticloud.v1.IAttachedOidcConfig|null); - /** AwsCluster awsRegion */ - awsRegion?: (string|null); + /** AttachedCluster platformVersion */ + platformVersion?: (string|null); - /** AwsCluster controlPlane */ - controlPlane?: (google.cloud.gkemulticloud.v1.IAwsControlPlane|null); + /** AttachedCluster distribution */ + distribution?: (string|null); - /** AwsCluster authorization */ - authorization?: (google.cloud.gkemulticloud.v1.IAwsAuthorization|null); + /** AttachedCluster clusterRegion */ + clusterRegion?: (string|null); - /** AwsCluster state */ - state?: (google.cloud.gkemulticloud.v1.AwsCluster.State|keyof typeof google.cloud.gkemulticloud.v1.AwsCluster.State|null); + /** AttachedCluster fleet */ + fleet?: (google.cloud.gkemulticloud.v1.IFleet|null); - /** AwsCluster endpoint */ - endpoint?: (string|null); + /** AttachedCluster state */ + state?: (google.cloud.gkemulticloud.v1.AttachedCluster.State|keyof typeof google.cloud.gkemulticloud.v1.AttachedCluster.State|null); - /** AwsCluster uid */ + /** AttachedCluster uid */ uid?: (string|null); - /** AwsCluster reconciling */ + /** AttachedCluster reconciling */ reconciling?: (boolean|null); - /** AwsCluster createTime */ + /** AttachedCluster createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** AwsCluster updateTime */ + /** AttachedCluster updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - /** AwsCluster etag */ + /** AttachedCluster etag */ etag?: (string|null); - /** AwsCluster annotations */ + /** AttachedCluster kubernetesVersion */ + kubernetesVersion?: (string|null); + + /** AttachedCluster annotations */ annotations?: ({ [k: string]: string }|null); - /** AwsCluster workloadIdentityConfig */ + /** AttachedCluster workloadIdentityConfig */ workloadIdentityConfig?: (google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null); - /** AwsCluster clusterCaCertificate */ - clusterCaCertificate?: (string|null); + /** AttachedCluster loggingConfig */ + loggingConfig?: (google.cloud.gkemulticloud.v1.ILoggingConfig|null); - /** AwsCluster fleet */ - fleet?: (google.cloud.gkemulticloud.v1.IFleet|null); + /** AttachedCluster errors */ + errors?: (google.cloud.gkemulticloud.v1.IAttachedClusterError[]|null); - /** AwsCluster loggingConfig */ - loggingConfig?: (google.cloud.gkemulticloud.v1.ILoggingConfig|null); + /** AttachedCluster authorization */ + authorization?: (google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization|null); + + /** AttachedCluster monitoringConfig */ + monitoringConfig?: (google.cloud.gkemulticloud.v1.IMonitoringConfig|null); } - /** Represents an AwsCluster. */ - class AwsCluster implements IAwsCluster { + /** Represents an AttachedCluster. */ + class AttachedCluster implements IAttachedCluster { /** - * Constructs a new AwsCluster. + * Constructs a new AttachedCluster. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsCluster); + constructor(properties?: google.cloud.gkemulticloud.v1.IAttachedCluster); - /** AwsCluster name. */ + /** AttachedCluster name. */ public name: string; - /** AwsCluster description. */ + /** AttachedCluster description. */ public description: string; - /** AwsCluster networking. */ - public networking?: (google.cloud.gkemulticloud.v1.IAwsClusterNetworking|null); + /** AttachedCluster oidcConfig. */ + public oidcConfig?: (google.cloud.gkemulticloud.v1.IAttachedOidcConfig|null); - /** AwsCluster awsRegion. */ - public awsRegion: string; + /** AttachedCluster platformVersion. */ + public platformVersion: string; - /** AwsCluster controlPlane. */ - public controlPlane?: (google.cloud.gkemulticloud.v1.IAwsControlPlane|null); + /** AttachedCluster distribution. */ + public distribution: string; - /** AwsCluster authorization. */ - public authorization?: (google.cloud.gkemulticloud.v1.IAwsAuthorization|null); + /** AttachedCluster clusterRegion. */ + public clusterRegion: string; - /** AwsCluster state. */ - public state: (google.cloud.gkemulticloud.v1.AwsCluster.State|keyof typeof google.cloud.gkemulticloud.v1.AwsCluster.State); + /** AttachedCluster fleet. */ + public fleet?: (google.cloud.gkemulticloud.v1.IFleet|null); - /** AwsCluster endpoint. */ - public endpoint: string; + /** AttachedCluster state. */ + public state: (google.cloud.gkemulticloud.v1.AttachedCluster.State|keyof typeof google.cloud.gkemulticloud.v1.AttachedCluster.State); - /** AwsCluster uid. */ + /** AttachedCluster uid. */ public uid: string; - /** AwsCluster reconciling. */ + /** AttachedCluster reconciling. */ public reconciling: boolean; - /** AwsCluster createTime. */ + /** AttachedCluster createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** AwsCluster updateTime. */ + /** AttachedCluster updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** AwsCluster etag. */ + /** AttachedCluster etag. */ public etag: string; - /** AwsCluster annotations. */ + /** AttachedCluster kubernetesVersion. */ + public kubernetesVersion: string; + + /** AttachedCluster annotations. */ public annotations: { [k: string]: string }; - /** AwsCluster workloadIdentityConfig. */ + /** AttachedCluster workloadIdentityConfig. */ public workloadIdentityConfig?: (google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null); - /** AwsCluster clusterCaCertificate. */ - public clusterCaCertificate: string; + /** AttachedCluster loggingConfig. */ + public loggingConfig?: (google.cloud.gkemulticloud.v1.ILoggingConfig|null); - /** AwsCluster fleet. */ - public fleet?: (google.cloud.gkemulticloud.v1.IFleet|null); + /** AttachedCluster errors. */ + public errors: google.cloud.gkemulticloud.v1.IAttachedClusterError[]; - /** AwsCluster loggingConfig. */ - public loggingConfig?: (google.cloud.gkemulticloud.v1.ILoggingConfig|null); + /** AttachedCluster authorization. */ + public authorization?: (google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization|null); + + /** AttachedCluster monitoringConfig. */ + public monitoringConfig?: (google.cloud.gkemulticloud.v1.IMonitoringConfig|null); /** - * Creates a new AwsCluster instance using the specified properties. + * Creates a new AttachedCluster instance using the specified properties. * @param [properties] Properties to set - * @returns AwsCluster instance + * @returns AttachedCluster instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsCluster): google.cloud.gkemulticloud.v1.AwsCluster; + public static create(properties?: google.cloud.gkemulticloud.v1.IAttachedCluster): google.cloud.gkemulticloud.v1.AttachedCluster; /** - * Encodes the specified AwsCluster message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsCluster.verify|verify} messages. - * @param message AwsCluster message or plain object to encode + * Encodes the specified AttachedCluster message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedCluster.verify|verify} messages. + * @param message AttachedCluster message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsCluster, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAttachedCluster, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsCluster message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsCluster.verify|verify} messages. - * @param message AwsCluster message or plain object to encode + * Encodes the specified AttachedCluster message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedCluster.verify|verify} messages. + * @param message AttachedCluster message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsCluster, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAttachedCluster, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsCluster message from the specified reader or buffer. + * Decodes an AttachedCluster message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsCluster + * @returns AttachedCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsCluster; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AttachedCluster; /** - * Decodes an AwsCluster message from the specified reader or buffer, length delimited. + * Decodes an AttachedCluster message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsCluster + * @returns AttachedCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsCluster; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AttachedCluster; /** - * Verifies an AwsCluster message. + * Verifies an AttachedCluster message. * @param message Plain 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 AwsCluster message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedCluster message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsCluster + * @returns AttachedCluster */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsCluster; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AttachedCluster; /** - * Creates a plain object from an AwsCluster message. Also converts values to other types if specified. - * @param message AwsCluster + * Creates a plain object from an AttachedCluster message. Also converts values to other types if specified. + * @param message AttachedCluster * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AttachedCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsCluster to JSON. + * Converts this AttachedCluster to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsCluster + * Gets the default type url for AttachedCluster * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AwsCluster { + namespace AttachedCluster { /** State enum. */ enum State { @@ -239,2623 +251,5227 @@ export namespace google { } } - /** Properties of an AwsControlPlane. */ - interface IAwsControlPlane { - - /** AwsControlPlane version */ - version?: (string|null); - - /** AwsControlPlane instanceType */ - instanceType?: (string|null); - - /** AwsControlPlane sshConfig */ - sshConfig?: (google.cloud.gkemulticloud.v1.IAwsSshConfig|null); - - /** AwsControlPlane subnetIds */ - subnetIds?: (string[]|null); - - /** AwsControlPlane securityGroupIds */ - securityGroupIds?: (string[]|null); - - /** AwsControlPlane iamInstanceProfile */ - iamInstanceProfile?: (string|null); - - /** AwsControlPlane rootVolume */ - rootVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); - - /** AwsControlPlane mainVolume */ - mainVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); - - /** AwsControlPlane databaseEncryption */ - databaseEncryption?: (google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption|null); - - /** AwsControlPlane tags */ - tags?: ({ [k: string]: string }|null); - - /** AwsControlPlane awsServicesAuthentication */ - awsServicesAuthentication?: (google.cloud.gkemulticloud.v1.IAwsServicesAuthentication|null); - - /** AwsControlPlane proxyConfig */ - proxyConfig?: (google.cloud.gkemulticloud.v1.IAwsProxyConfig|null); - - /** AwsControlPlane configEncryption */ - configEncryption?: (google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null); + /** Properties of an AttachedClustersAuthorization. */ + interface IAttachedClustersAuthorization { - /** AwsControlPlane instancePlacement */ - instancePlacement?: (google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null); + /** AttachedClustersAuthorization adminUsers */ + adminUsers?: (google.cloud.gkemulticloud.v1.IAttachedClusterUser[]|null); } - /** Represents an AwsControlPlane. */ - class AwsControlPlane implements IAwsControlPlane { + /** Represents an AttachedClustersAuthorization. */ + class AttachedClustersAuthorization implements IAttachedClustersAuthorization { /** - * Constructs a new AwsControlPlane. + * Constructs a new AttachedClustersAuthorization. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsControlPlane); - - /** AwsControlPlane version. */ - public version: string; - - /** AwsControlPlane instanceType. */ - public instanceType: string; - - /** AwsControlPlane sshConfig. */ - public sshConfig?: (google.cloud.gkemulticloud.v1.IAwsSshConfig|null); - - /** AwsControlPlane subnetIds. */ - public subnetIds: string[]; - - /** AwsControlPlane securityGroupIds. */ - public securityGroupIds: string[]; - - /** AwsControlPlane iamInstanceProfile. */ - public iamInstanceProfile: string; - - /** AwsControlPlane rootVolume. */ - public rootVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); - - /** AwsControlPlane mainVolume. */ - public mainVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); - - /** AwsControlPlane databaseEncryption. */ - public databaseEncryption?: (google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption|null); - - /** AwsControlPlane tags. */ - public tags: { [k: string]: string }; - - /** AwsControlPlane awsServicesAuthentication. */ - public awsServicesAuthentication?: (google.cloud.gkemulticloud.v1.IAwsServicesAuthentication|null); - - /** AwsControlPlane proxyConfig. */ - public proxyConfig?: (google.cloud.gkemulticloud.v1.IAwsProxyConfig|null); + constructor(properties?: google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization); - /** AwsControlPlane configEncryption. */ - public configEncryption?: (google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null); - - /** AwsControlPlane instancePlacement. */ - public instancePlacement?: (google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null); + /** AttachedClustersAuthorization adminUsers. */ + public adminUsers: google.cloud.gkemulticloud.v1.IAttachedClusterUser[]; /** - * Creates a new AwsControlPlane instance using the specified properties. + * Creates a new AttachedClustersAuthorization instance using the specified properties. * @param [properties] Properties to set - * @returns AwsControlPlane instance + * @returns AttachedClustersAuthorization instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsControlPlane): google.cloud.gkemulticloud.v1.AwsControlPlane; + public static create(properties?: google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization): google.cloud.gkemulticloud.v1.AttachedClustersAuthorization; /** - * Encodes the specified AwsControlPlane message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsControlPlane.verify|verify} messages. - * @param message AwsControlPlane message or plain object to encode + * Encodes the specified AttachedClustersAuthorization message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.verify|verify} messages. + * @param message AttachedClustersAuthorization message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsControlPlane, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsControlPlane message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsControlPlane.verify|verify} messages. - * @param message AwsControlPlane message or plain object to encode + * Encodes the specified AttachedClustersAuthorization message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.verify|verify} messages. + * @param message AttachedClustersAuthorization message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsControlPlane, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsControlPlane message from the specified reader or buffer. + * Decodes an AttachedClustersAuthorization message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsControlPlane + * @returns AttachedClustersAuthorization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsControlPlane; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AttachedClustersAuthorization; /** - * Decodes an AwsControlPlane message from the specified reader or buffer, length delimited. + * Decodes an AttachedClustersAuthorization message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsControlPlane + * @returns AttachedClustersAuthorization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsControlPlane; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AttachedClustersAuthorization; /** - * Verifies an AwsControlPlane message. + * Verifies an AttachedClustersAuthorization message. * @param message Plain 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 AwsControlPlane message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedClustersAuthorization message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsControlPlane + * @returns AttachedClustersAuthorization */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsControlPlane; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AttachedClustersAuthorization; /** - * Creates a plain object from an AwsControlPlane message. Also converts values to other types if specified. - * @param message AwsControlPlane + * Creates a plain object from an AttachedClustersAuthorization message. Also converts values to other types if specified. + * @param message AttachedClustersAuthorization * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsControlPlane, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AttachedClustersAuthorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsControlPlane to JSON. + * Converts this AttachedClustersAuthorization to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsControlPlane + * Gets the default type url for AttachedClustersAuthorization * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsServicesAuthentication. */ - interface IAwsServicesAuthentication { - - /** AwsServicesAuthentication roleArn */ - roleArn?: (string|null); + /** Properties of an AttachedClusterUser. */ + interface IAttachedClusterUser { - /** AwsServicesAuthentication roleSessionName */ - roleSessionName?: (string|null); + /** AttachedClusterUser username */ + username?: (string|null); } - /** Represents an AwsServicesAuthentication. */ - class AwsServicesAuthentication implements IAwsServicesAuthentication { + /** Represents an AttachedClusterUser. */ + class AttachedClusterUser implements IAttachedClusterUser { /** - * Constructs a new AwsServicesAuthentication. + * Constructs a new AttachedClusterUser. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsServicesAuthentication); - - /** AwsServicesAuthentication roleArn. */ - public roleArn: string; + constructor(properties?: google.cloud.gkemulticloud.v1.IAttachedClusterUser); - /** AwsServicesAuthentication roleSessionName. */ - public roleSessionName: string; + /** AttachedClusterUser username. */ + public username: string; /** - * Creates a new AwsServicesAuthentication instance using the specified properties. + * Creates a new AttachedClusterUser instance using the specified properties. * @param [properties] Properties to set - * @returns AwsServicesAuthentication instance + * @returns AttachedClusterUser instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsServicesAuthentication): google.cloud.gkemulticloud.v1.AwsServicesAuthentication; + public static create(properties?: google.cloud.gkemulticloud.v1.IAttachedClusterUser): google.cloud.gkemulticloud.v1.AttachedClusterUser; /** - * Encodes the specified AwsServicesAuthentication message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify|verify} messages. - * @param message AwsServicesAuthentication message or plain object to encode + * Encodes the specified AttachedClusterUser message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClusterUser.verify|verify} messages. + * @param message AttachedClusterUser message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsServicesAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAttachedClusterUser, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsServicesAuthentication message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify|verify} messages. - * @param message AwsServicesAuthentication message or plain object to encode + * Encodes the specified AttachedClusterUser message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClusterUser.verify|verify} messages. + * @param message AttachedClusterUser message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsServicesAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAttachedClusterUser, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsServicesAuthentication message from the specified reader or buffer. + * Decodes an AttachedClusterUser message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsServicesAuthentication + * @returns AttachedClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsServicesAuthentication; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AttachedClusterUser; /** - * Decodes an AwsServicesAuthentication message from the specified reader or buffer, length delimited. + * Decodes an AttachedClusterUser message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsServicesAuthentication + * @returns AttachedClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsServicesAuthentication; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AttachedClusterUser; /** - * Verifies an AwsServicesAuthentication message. + * Verifies an AttachedClusterUser message. * @param message Plain 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 AwsServicesAuthentication message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedClusterUser message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsServicesAuthentication + * @returns AttachedClusterUser */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsServicesAuthentication; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AttachedClusterUser; /** - * Creates a plain object from an AwsServicesAuthentication message. Also converts values to other types if specified. - * @param message AwsServicesAuthentication + * Creates a plain object from an AttachedClusterUser message. Also converts values to other types if specified. + * @param message AttachedClusterUser * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsServicesAuthentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AttachedClusterUser, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsServicesAuthentication to JSON. + * Converts this AttachedClusterUser to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsServicesAuthentication + * Gets the default type url for AttachedClusterUser * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsAuthorization. */ - interface IAwsAuthorization { + /** Properties of an AttachedOidcConfig. */ + interface IAttachedOidcConfig { - /** AwsAuthorization adminUsers */ - adminUsers?: (google.cloud.gkemulticloud.v1.IAwsClusterUser[]|null); + /** AttachedOidcConfig issuerUrl */ + issuerUrl?: (string|null); + + /** AttachedOidcConfig jwks */ + jwks?: (Uint8Array|string|null); } - /** Represents an AwsAuthorization. */ - class AwsAuthorization implements IAwsAuthorization { + /** Represents an AttachedOidcConfig. */ + class AttachedOidcConfig implements IAttachedOidcConfig { /** - * Constructs a new AwsAuthorization. + * Constructs a new AttachedOidcConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsAuthorization); + constructor(properties?: google.cloud.gkemulticloud.v1.IAttachedOidcConfig); - /** AwsAuthorization adminUsers. */ - public adminUsers: google.cloud.gkemulticloud.v1.IAwsClusterUser[]; + /** AttachedOidcConfig issuerUrl. */ + public issuerUrl: string; + + /** AttachedOidcConfig jwks. */ + public jwks: (Uint8Array|string); /** - * Creates a new AwsAuthorization instance using the specified properties. + * Creates a new AttachedOidcConfig instance using the specified properties. * @param [properties] Properties to set - * @returns AwsAuthorization instance + * @returns AttachedOidcConfig instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsAuthorization): google.cloud.gkemulticloud.v1.AwsAuthorization; + public static create(properties?: google.cloud.gkemulticloud.v1.IAttachedOidcConfig): google.cloud.gkemulticloud.v1.AttachedOidcConfig; /** - * Encodes the specified AwsAuthorization message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAuthorization.verify|verify} messages. - * @param message AwsAuthorization message or plain object to encode + * Encodes the specified AttachedOidcConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedOidcConfig.verify|verify} messages. + * @param message AttachedOidcConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAttachedOidcConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsAuthorization message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAuthorization.verify|verify} messages. - * @param message AwsAuthorization message or plain object to encode + * Encodes the specified AttachedOidcConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedOidcConfig.verify|verify} messages. + * @param message AttachedOidcConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAttachedOidcConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsAuthorization message from the specified reader or buffer. + * Decodes an AttachedOidcConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsAuthorization + * @returns AttachedOidcConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsAuthorization; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AttachedOidcConfig; /** - * Decodes an AwsAuthorization message from the specified reader or buffer, length delimited. + * Decodes an AttachedOidcConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsAuthorization + * @returns AttachedOidcConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsAuthorization; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AttachedOidcConfig; /** - * Verifies an AwsAuthorization message. + * Verifies an AttachedOidcConfig message. * @param message Plain 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 AwsAuthorization message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedOidcConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsAuthorization + * @returns AttachedOidcConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsAuthorization; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AttachedOidcConfig; /** - * Creates a plain object from an AwsAuthorization message. Also converts values to other types if specified. - * @param message AwsAuthorization + * Creates a plain object from an AttachedOidcConfig message. Also converts values to other types if specified. + * @param message AttachedOidcConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsAuthorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AttachedOidcConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsAuthorization to JSON. + * Converts this AttachedOidcConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsAuthorization + * Gets the default type url for AttachedOidcConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsClusterUser. */ - interface IAwsClusterUser { + /** Properties of an AttachedServerConfig. */ + interface IAttachedServerConfig { - /** AwsClusterUser username */ - username?: (string|null); + /** AttachedServerConfig name */ + name?: (string|null); + + /** AttachedServerConfig validVersions */ + validVersions?: (google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo[]|null); } - /** Represents an AwsClusterUser. */ - class AwsClusterUser implements IAwsClusterUser { + /** Represents an AttachedServerConfig. */ + class AttachedServerConfig implements IAttachedServerConfig { /** - * Constructs a new AwsClusterUser. + * Constructs a new AttachedServerConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsClusterUser); + constructor(properties?: google.cloud.gkemulticloud.v1.IAttachedServerConfig); - /** AwsClusterUser username. */ - public username: string; + /** AttachedServerConfig name. */ + public name: string; + + /** AttachedServerConfig validVersions. */ + public validVersions: google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo[]; /** - * Creates a new AwsClusterUser instance using the specified properties. + * Creates a new AttachedServerConfig instance using the specified properties. * @param [properties] Properties to set - * @returns AwsClusterUser instance + * @returns AttachedServerConfig instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsClusterUser): google.cloud.gkemulticloud.v1.AwsClusterUser; + public static create(properties?: google.cloud.gkemulticloud.v1.IAttachedServerConfig): google.cloud.gkemulticloud.v1.AttachedServerConfig; /** - * Encodes the specified AwsClusterUser message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterUser.verify|verify} messages. - * @param message AwsClusterUser message or plain object to encode + * Encodes the specified AttachedServerConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedServerConfig.verify|verify} messages. + * @param message AttachedServerConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsClusterUser, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAttachedServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsClusterUser message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterUser.verify|verify} messages. - * @param message AwsClusterUser message or plain object to encode + * Encodes the specified AttachedServerConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedServerConfig.verify|verify} messages. + * @param message AttachedServerConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsClusterUser, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAttachedServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsClusterUser message from the specified reader or buffer. + * Decodes an AttachedServerConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsClusterUser + * @returns AttachedServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsClusterUser; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AttachedServerConfig; /** - * Decodes an AwsClusterUser message from the specified reader or buffer, length delimited. + * Decodes an AttachedServerConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsClusterUser + * @returns AttachedServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsClusterUser; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AttachedServerConfig; /** - * Verifies an AwsClusterUser message. + * Verifies an AttachedServerConfig message. * @param message Plain 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 AwsClusterUser message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedServerConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsClusterUser + * @returns AttachedServerConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsClusterUser; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AttachedServerConfig; /** - * Creates a plain object from an AwsClusterUser message. Also converts values to other types if specified. - * @param message AwsClusterUser + * Creates a plain object from an AttachedServerConfig message. Also converts values to other types if specified. + * @param message AttachedServerConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsClusterUser, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AttachedServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsClusterUser to JSON. + * Converts this AttachedServerConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsClusterUser + * Gets the default type url for AttachedServerConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsDatabaseEncryption. */ - interface IAwsDatabaseEncryption { + /** Properties of an AttachedPlatformVersionInfo. */ + interface IAttachedPlatformVersionInfo { - /** AwsDatabaseEncryption kmsKeyArn */ - kmsKeyArn?: (string|null); + /** AttachedPlatformVersionInfo version */ + version?: (string|null); } - /** Represents an AwsDatabaseEncryption. */ - class AwsDatabaseEncryption implements IAwsDatabaseEncryption { + /** Represents an AttachedPlatformVersionInfo. */ + class AttachedPlatformVersionInfo implements IAttachedPlatformVersionInfo { /** - * Constructs a new AwsDatabaseEncryption. + * Constructs a new AttachedPlatformVersionInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption); + constructor(properties?: google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo); - /** AwsDatabaseEncryption kmsKeyArn. */ - public kmsKeyArn: string; + /** AttachedPlatformVersionInfo version. */ + public version: string; /** - * Creates a new AwsDatabaseEncryption instance using the specified properties. + * Creates a new AttachedPlatformVersionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns AwsDatabaseEncryption instance + * @returns AttachedPlatformVersionInfo instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption): google.cloud.gkemulticloud.v1.AwsDatabaseEncryption; + public static create(properties?: google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo): google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo; /** - * Encodes the specified AwsDatabaseEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify|verify} messages. - * @param message AwsDatabaseEncryption message or plain object to encode + * Encodes the specified AttachedPlatformVersionInfo message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.verify|verify} messages. + * @param message AttachedPlatformVersionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsDatabaseEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify|verify} messages. - * @param message AwsDatabaseEncryption message or plain object to encode + * Encodes the specified AttachedPlatformVersionInfo message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.verify|verify} messages. + * @param message AttachedPlatformVersionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsDatabaseEncryption message from the specified reader or buffer. + * Decodes an AttachedPlatformVersionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsDatabaseEncryption + * @returns AttachedPlatformVersionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsDatabaseEncryption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo; /** - * Decodes an AwsDatabaseEncryption message from the specified reader or buffer, length delimited. + * Decodes an AttachedPlatformVersionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsDatabaseEncryption + * @returns AttachedPlatformVersionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsDatabaseEncryption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo; /** - * Verifies an AwsDatabaseEncryption message. + * Verifies an AttachedPlatformVersionInfo message. * @param message Plain 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 AwsDatabaseEncryption message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedPlatformVersionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsDatabaseEncryption + * @returns AttachedPlatformVersionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsDatabaseEncryption; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo; /** - * Creates a plain object from an AwsDatabaseEncryption message. Also converts values to other types if specified. - * @param message AwsDatabaseEncryption + * Creates a plain object from an AttachedPlatformVersionInfo message. Also converts values to other types if specified. + * @param message AttachedPlatformVersionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsDatabaseEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsDatabaseEncryption to JSON. + * Converts this AttachedPlatformVersionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsDatabaseEncryption + * Gets the default type url for AttachedPlatformVersionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsVolumeTemplate. */ - interface IAwsVolumeTemplate { - - /** AwsVolumeTemplate sizeGib */ - sizeGib?: (number|null); - - /** AwsVolumeTemplate volumeType */ - volumeType?: (google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType|keyof typeof google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType|null); - - /** AwsVolumeTemplate iops */ - iops?: (number|null); + /** Properties of an AttachedClusterError. */ + interface IAttachedClusterError { - /** AwsVolumeTemplate kmsKeyArn */ - kmsKeyArn?: (string|null); + /** AttachedClusterError message */ + message?: (string|null); } - /** Represents an AwsVolumeTemplate. */ - class AwsVolumeTemplate implements IAwsVolumeTemplate { + /** Represents an AttachedClusterError. */ + class AttachedClusterError implements IAttachedClusterError { /** - * Constructs a new AwsVolumeTemplate. + * Constructs a new AttachedClusterError. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsVolumeTemplate); - - /** AwsVolumeTemplate sizeGib. */ - public sizeGib: number; - - /** AwsVolumeTemplate volumeType. */ - public volumeType: (google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType|keyof typeof google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType); + constructor(properties?: google.cloud.gkemulticloud.v1.IAttachedClusterError); - /** AwsVolumeTemplate iops. */ - public iops: number; - - /** AwsVolumeTemplate kmsKeyArn. */ - public kmsKeyArn: string; + /** AttachedClusterError message. */ + public message: string; /** - * Creates a new AwsVolumeTemplate instance using the specified properties. + * Creates a new AttachedClusterError instance using the specified properties. * @param [properties] Properties to set - * @returns AwsVolumeTemplate instance + * @returns AttachedClusterError instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsVolumeTemplate): google.cloud.gkemulticloud.v1.AwsVolumeTemplate; + public static create(properties?: google.cloud.gkemulticloud.v1.IAttachedClusterError): google.cloud.gkemulticloud.v1.AttachedClusterError; /** - * Encodes the specified AwsVolumeTemplate message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify|verify} messages. - * @param message AwsVolumeTemplate message or plain object to encode + * Encodes the specified AttachedClusterError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClusterError.verify|verify} messages. + * @param message AttachedClusterError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsVolumeTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAttachedClusterError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsVolumeTemplate message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify|verify} messages. - * @param message AwsVolumeTemplate message or plain object to encode + * Encodes the specified AttachedClusterError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClusterError.verify|verify} messages. + * @param message AttachedClusterError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsVolumeTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAttachedClusterError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsVolumeTemplate message from the specified reader or buffer. + * Decodes an AttachedClusterError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsVolumeTemplate + * @returns AttachedClusterError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsVolumeTemplate; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AttachedClusterError; /** - * Decodes an AwsVolumeTemplate message from the specified reader or buffer, length delimited. + * Decodes an AttachedClusterError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsVolumeTemplate + * @returns AttachedClusterError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsVolumeTemplate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AttachedClusterError; /** - * Verifies an AwsVolumeTemplate message. + * Verifies an AttachedClusterError message. * @param message Plain 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 AwsVolumeTemplate message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedClusterError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsVolumeTemplate + * @returns AttachedClusterError */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsVolumeTemplate; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AttachedClusterError; /** - * Creates a plain object from an AwsVolumeTemplate message. Also converts values to other types if specified. - * @param message AwsVolumeTemplate + * Creates a plain object from an AttachedClusterError message. Also converts values to other types if specified. + * @param message AttachedClusterError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsVolumeTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AttachedClusterError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsVolumeTemplate to JSON. + * Converts this AttachedClusterError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsVolumeTemplate + * Gets the default type url for AttachedClusterError * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AwsVolumeTemplate { - - /** VolumeType enum. */ - enum VolumeType { - VOLUME_TYPE_UNSPECIFIED = 0, - GP2 = 1, - GP3 = 2 - } - } - - /** Properties of an AwsClusterNetworking. */ - interface IAwsClusterNetworking { + /** Properties of a WorkloadIdentityConfig. */ + interface IWorkloadIdentityConfig { - /** AwsClusterNetworking vpcId */ - vpcId?: (string|null); + /** WorkloadIdentityConfig issuerUri */ + issuerUri?: (string|null); - /** AwsClusterNetworking podAddressCidrBlocks */ - podAddressCidrBlocks?: (string[]|null); + /** WorkloadIdentityConfig workloadPool */ + workloadPool?: (string|null); - /** AwsClusterNetworking serviceAddressCidrBlocks */ - serviceAddressCidrBlocks?: (string[]|null); + /** WorkloadIdentityConfig identityProvider */ + identityProvider?: (string|null); } - /** Represents an AwsClusterNetworking. */ - class AwsClusterNetworking implements IAwsClusterNetworking { + /** Represents a WorkloadIdentityConfig. */ + class WorkloadIdentityConfig implements IWorkloadIdentityConfig { /** - * Constructs a new AwsClusterNetworking. + * Constructs a new WorkloadIdentityConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsClusterNetworking); + constructor(properties?: google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig); - /** AwsClusterNetworking vpcId. */ - public vpcId: string; + /** WorkloadIdentityConfig issuerUri. */ + public issuerUri: string; - /** AwsClusterNetworking podAddressCidrBlocks. */ - public podAddressCidrBlocks: string[]; + /** WorkloadIdentityConfig workloadPool. */ + public workloadPool: string; - /** AwsClusterNetworking serviceAddressCidrBlocks. */ - public serviceAddressCidrBlocks: string[]; + /** WorkloadIdentityConfig identityProvider. */ + public identityProvider: string; /** - * Creates a new AwsClusterNetworking instance using the specified properties. + * Creates a new WorkloadIdentityConfig instance using the specified properties. * @param [properties] Properties to set - * @returns AwsClusterNetworking instance + * @returns WorkloadIdentityConfig instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsClusterNetworking): google.cloud.gkemulticloud.v1.AwsClusterNetworking; + public static create(properties?: google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig): google.cloud.gkemulticloud.v1.WorkloadIdentityConfig; /** - * Encodes the specified AwsClusterNetworking message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify|verify} messages. - * @param message AwsClusterNetworking message or plain object to encode + * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify|verify} messages. + * @param message WorkloadIdentityConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsClusterNetworking, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsClusterNetworking message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify|verify} messages. - * @param message AwsClusterNetworking message or plain object to encode + * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify|verify} messages. + * @param message WorkloadIdentityConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsClusterNetworking, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsClusterNetworking message from the specified reader or buffer. + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsClusterNetworking + * @returns WorkloadIdentityConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsClusterNetworking; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.WorkloadIdentityConfig; /** - * Decodes an AwsClusterNetworking message from the specified reader or buffer, length delimited. + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsClusterNetworking + * @returns WorkloadIdentityConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsClusterNetworking; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.WorkloadIdentityConfig; /** - * Verifies an AwsClusterNetworking message. + * Verifies a WorkloadIdentityConfig message. * @param message Plain 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 AwsClusterNetworking message from a plain object. Also converts values to their respective internal types. + * Creates a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsClusterNetworking + * @returns WorkloadIdentityConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsClusterNetworking; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.WorkloadIdentityConfig; /** - * Creates a plain object from an AwsClusterNetworking message. Also converts values to other types if specified. - * @param message AwsClusterNetworking + * Creates a plain object from a WorkloadIdentityConfig message. Also converts values to other types if specified. + * @param message WorkloadIdentityConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsClusterNetworking, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.WorkloadIdentityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsClusterNetworking to JSON. + * Converts this WorkloadIdentityConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsClusterNetworking + * Gets the default type url for WorkloadIdentityConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsNodePool. */ - interface IAwsNodePool { + /** Properties of a MaxPodsConstraint. */ + interface IMaxPodsConstraint { - /** AwsNodePool name */ - name?: (string|null); + /** MaxPodsConstraint maxPodsPerNode */ + maxPodsPerNode?: (number|Long|string|null); + } - /** AwsNodePool version */ - version?: (string|null); + /** Represents a MaxPodsConstraint. */ + class MaxPodsConstraint implements IMaxPodsConstraint { - /** AwsNodePool config */ - config?: (google.cloud.gkemulticloud.v1.IAwsNodeConfig|null); + /** + * Constructs a new MaxPodsConstraint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IMaxPodsConstraint); - /** AwsNodePool autoscaling */ - autoscaling?: (google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling|null); + /** MaxPodsConstraint maxPodsPerNode. */ + public maxPodsPerNode: (number|Long|string); - /** AwsNodePool subnetId */ - subnetId?: (string|null); + /** + * Creates a new MaxPodsConstraint instance using the specified properties. + * @param [properties] Properties to set + * @returns MaxPodsConstraint instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IMaxPodsConstraint): google.cloud.gkemulticloud.v1.MaxPodsConstraint; - /** AwsNodePool state */ - state?: (google.cloud.gkemulticloud.v1.AwsNodePool.State|keyof typeof google.cloud.gkemulticloud.v1.AwsNodePool.State|null); + /** + * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify|verify} messages. + * @param message MaxPodsConstraint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; - /** AwsNodePool uid */ - uid?: (string|null); + /** + * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify|verify} messages. + * @param message MaxPodsConstraint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; - /** AwsNodePool reconciling */ - reconciling?: (boolean|null); + /** + * Decodes a MaxPodsConstraint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaxPodsConstraint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.MaxPodsConstraint; - /** AwsNodePool createTime */ + /** + * Decodes a MaxPodsConstraint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaxPodsConstraint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.MaxPodsConstraint; + + /** + * Verifies a MaxPodsConstraint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaxPodsConstraint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaxPodsConstraint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.MaxPodsConstraint; + + /** + * Creates a plain object from a MaxPodsConstraint message. Also converts values to other types if specified. + * @param message MaxPodsConstraint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.MaxPodsConstraint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaxPodsConstraint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaxPodsConstraint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** AwsNodePool updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** AwsNodePool etag */ - etag?: (string|null); + /** OperationMetadata target */ + target?: (string|null); - /** AwsNodePool annotations */ - annotations?: ({ [k: string]: string }|null); + /** OperationMetadata statusDetail */ + statusDetail?: (string|null); - /** AwsNodePool maxPodsConstraint */ - maxPodsConstraint?: (google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null); + /** OperationMetadata errorDetail */ + errorDetail?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); } - /** Represents an AwsNodePool. */ - class AwsNodePool implements IAwsNodePool { + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Constructs a new AwsNodePool. + * Constructs a new OperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsNodePool); + constructor(properties?: google.cloud.gkemulticloud.v1.IOperationMetadata); - /** AwsNodePool name. */ - public name: string; + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** AwsNodePool version. */ - public version: string; + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** AwsNodePool config. */ - public config?: (google.cloud.gkemulticloud.v1.IAwsNodeConfig|null); + /** OperationMetadata target. */ + public target: string; - /** AwsNodePool autoscaling. */ - public autoscaling?: (google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling|null); + /** OperationMetadata statusDetail. */ + public statusDetail: string; - /** AwsNodePool subnetId. */ - public subnetId: string; + /** OperationMetadata errorDetail. */ + public errorDetail: string; - /** AwsNodePool state. */ - public state: (google.cloud.gkemulticloud.v1.AwsNodePool.State|keyof typeof google.cloud.gkemulticloud.v1.AwsNodePool.State); + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IOperationMetadata): google.cloud.gkemulticloud.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.gkemulticloud.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeTaint. */ + interface INodeTaint { + + /** NodeTaint key */ + key?: (string|null); + + /** NodeTaint value */ + value?: (string|null); + + /** NodeTaint effect */ + effect?: (google.cloud.gkemulticloud.v1.NodeTaint.Effect|keyof typeof google.cloud.gkemulticloud.v1.NodeTaint.Effect|null); + } + + /** Represents a NodeTaint. */ + class NodeTaint implements INodeTaint { + + /** + * Constructs a new NodeTaint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.INodeTaint); + + /** NodeTaint key. */ + public key: string; + + /** NodeTaint value. */ + public value: string; + + /** NodeTaint effect. */ + public effect: (google.cloud.gkemulticloud.v1.NodeTaint.Effect|keyof typeof google.cloud.gkemulticloud.v1.NodeTaint.Effect); + + /** + * Creates a new NodeTaint instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeTaint instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.INodeTaint): google.cloud.gkemulticloud.v1.NodeTaint; + + /** + * Encodes the specified NodeTaint message. Does not implicitly {@link google.cloud.gkemulticloud.v1.NodeTaint.verify|verify} messages. + * @param message NodeTaint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.INodeTaint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.NodeTaint.verify|verify} messages. + * @param message NodeTaint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.INodeTaint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeTaint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeTaint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.NodeTaint; + + /** + * Decodes a NodeTaint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeTaint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.NodeTaint; + + /** + * Verifies a NodeTaint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeTaint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeTaint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.NodeTaint; + + /** + * Creates a plain object from a NodeTaint message. Also converts values to other types if specified. + * @param message NodeTaint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.NodeTaint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeTaint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeTaint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeTaint { + + /** Effect enum. */ + enum Effect { + EFFECT_UNSPECIFIED = 0, + NO_SCHEDULE = 1, + PREFER_NO_SCHEDULE = 2, + NO_EXECUTE = 3 + } + } + + /** Properties of a Fleet. */ + interface IFleet { + + /** Fleet project */ + project?: (string|null); + + /** Fleet membership */ + membership?: (string|null); + } + + /** Represents a Fleet. */ + class Fleet implements IFleet { + + /** + * Constructs a new Fleet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IFleet); + + /** Fleet project. */ + public project: string; + + /** Fleet membership. */ + public membership: string; + + /** + * Creates a new Fleet instance using the specified properties. + * @param [properties] Properties to set + * @returns Fleet instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IFleet): google.cloud.gkemulticloud.v1.Fleet; + + /** + * Encodes the specified Fleet message. Does not implicitly {@link google.cloud.gkemulticloud.v1.Fleet.verify|verify} messages. + * @param message Fleet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.Fleet.verify|verify} messages. + * @param message Fleet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Fleet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Fleet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.Fleet; + + /** + * Decodes a Fleet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Fleet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.Fleet; + + /** + * Verifies a Fleet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Fleet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Fleet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.Fleet; + + /** + * Creates a plain object from a Fleet message. Also converts values to other types if specified. + * @param message Fleet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.Fleet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Fleet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Fleet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoggingConfig. */ + interface ILoggingConfig { + + /** LoggingConfig componentConfig */ + componentConfig?: (google.cloud.gkemulticloud.v1.ILoggingComponentConfig|null); + } + + /** Represents a LoggingConfig. */ + class LoggingConfig implements ILoggingConfig { + + /** + * Constructs a new LoggingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.ILoggingConfig); + + /** LoggingConfig componentConfig. */ + public componentConfig?: (google.cloud.gkemulticloud.v1.ILoggingComponentConfig|null); + + /** + * Creates a new LoggingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingConfig instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.ILoggingConfig): google.cloud.gkemulticloud.v1.LoggingConfig; + + /** + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingConfig.verify|verify} messages. + * @param message LoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingConfig.verify|verify} messages. + * @param message LoggingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoggingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.LoggingConfig; + + /** + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.LoggingConfig; + + /** + * Verifies a LoggingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoggingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.LoggingConfig; + + /** + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * @param message LoggingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.LoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoggingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoggingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoggingComponentConfig. */ + interface ILoggingComponentConfig { + + /** LoggingComponentConfig enableComponents */ + enableComponents?: (google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component[]|null); + } + + /** Represents a LoggingComponentConfig. */ + class LoggingComponentConfig implements ILoggingComponentConfig { + + /** + * Constructs a new LoggingComponentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.ILoggingComponentConfig); + + /** LoggingComponentConfig enableComponents. */ + public enableComponents: google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component[]; + + /** + * Creates a new LoggingComponentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LoggingComponentConfig instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.ILoggingComponentConfig): google.cloud.gkemulticloud.v1.LoggingComponentConfig; + + /** + * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify|verify} messages. + * @param message LoggingComponentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.ILoggingComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify|verify} messages. + * @param message LoggingComponentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.ILoggingComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoggingComponentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoggingComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.LoggingComponentConfig; + + /** + * Decodes a LoggingComponentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoggingComponentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.LoggingComponentConfig; + + /** + * Verifies a LoggingComponentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoggingComponentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoggingComponentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.LoggingComponentConfig; + + /** + * Creates a plain object from a LoggingComponentConfig message. Also converts values to other types if specified. + * @param message LoggingComponentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.LoggingComponentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoggingComponentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoggingComponentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoggingComponentConfig { + + /** Component enum. */ + enum Component { + COMPONENT_UNSPECIFIED = 0, + SYSTEM_COMPONENTS = 1, + WORKLOADS = 2 + } + } + + /** Properties of a MonitoringConfig. */ + interface IMonitoringConfig { + + /** MonitoringConfig managedPrometheusConfig */ + managedPrometheusConfig?: (google.cloud.gkemulticloud.v1.IManagedPrometheusConfig|null); + } + + /** Represents a MonitoringConfig. */ + class MonitoringConfig implements IMonitoringConfig { + + /** + * Constructs a new MonitoringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IMonitoringConfig); + + /** MonitoringConfig managedPrometheusConfig. */ + public managedPrometheusConfig?: (google.cloud.gkemulticloud.v1.IManagedPrometheusConfig|null); + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringConfig instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IMonitoringConfig): google.cloud.gkemulticloud.v1.MonitoringConfig; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.MonitoringConfig.verify|verify} messages. + * @param message MonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.MonitoringConfig.verify|verify} messages. + * @param message MonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.MonitoringConfig; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.MonitoringConfig; + + /** + * Verifies a MonitoringConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.MonitoringConfig; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @param message MonitoringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.MonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ManagedPrometheusConfig. */ + interface IManagedPrometheusConfig { + + /** ManagedPrometheusConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ManagedPrometheusConfig. */ + class ManagedPrometheusConfig implements IManagedPrometheusConfig { + + /** + * Constructs a new ManagedPrometheusConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IManagedPrometheusConfig); + + /** ManagedPrometheusConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ManagedPrometheusConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagedPrometheusConfig instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IManagedPrometheusConfig): google.cloud.gkemulticloud.v1.ManagedPrometheusConfig; + + /** + * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.verify|verify} messages. + * @param message ManagedPrometheusConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IManagedPrometheusConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.verify|verify} messages. + * @param message ManagedPrometheusConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IManagedPrometheusConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagedPrometheusConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.ManagedPrometheusConfig; + + /** + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagedPrometheusConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.ManagedPrometheusConfig; + + /** + * Verifies a ManagedPrometheusConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagedPrometheusConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagedPrometheusConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.ManagedPrometheusConfig; + + /** + * Creates a plain object from a ManagedPrometheusConfig message. Also converts values to other types if specified. + * @param message ManagedPrometheusConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.ManagedPrometheusConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagedPrometheusConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagedPrometheusConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents an AttachedClusters */ + class AttachedClusters extends $protobuf.rpc.Service { + + /** + * Constructs a new AttachedClusters service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new AttachedClusters service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AttachedClusters; + + /** + * Calls CreateAttachedCluster. + * @param request CreateAttachedClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAttachedCluster(request: google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, callback: google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedClusterCallback): void; + + /** + * Calls CreateAttachedCluster. + * @param request CreateAttachedClusterRequest message or plain object + * @returns Promise + */ + public createAttachedCluster(request: google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest): Promise; + + /** + * Calls UpdateAttachedCluster. + * @param request UpdateAttachedClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAttachedCluster(request: google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, callback: google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedClusterCallback): void; + + /** + * Calls UpdateAttachedCluster. + * @param request UpdateAttachedClusterRequest message or plain object + * @returns Promise + */ + public updateAttachedCluster(request: google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest): Promise; + + /** + * Calls ImportAttachedCluster. + * @param request ImportAttachedClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importAttachedCluster(request: google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, callback: google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedClusterCallback): void; + + /** + * Calls ImportAttachedCluster. + * @param request ImportAttachedClusterRequest message or plain object + * @returns Promise + */ + public importAttachedCluster(request: google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest): Promise; + + /** + * Calls GetAttachedCluster. + * @param request GetAttachedClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AttachedCluster + */ + public getAttachedCluster(request: google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, callback: google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedClusterCallback): void; + + /** + * Calls GetAttachedCluster. + * @param request GetAttachedClusterRequest message or plain object + * @returns Promise + */ + public getAttachedCluster(request: google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest): Promise; + + /** + * Calls ListAttachedClusters. + * @param request ListAttachedClustersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAttachedClustersResponse + */ + public listAttachedClusters(request: google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, callback: google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClustersCallback): void; + + /** + * Calls ListAttachedClusters. + * @param request ListAttachedClustersRequest message or plain object + * @returns Promise + */ + public listAttachedClusters(request: google.cloud.gkemulticloud.v1.IListAttachedClustersRequest): Promise; + + /** + * Calls DeleteAttachedCluster. + * @param request DeleteAttachedClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAttachedCluster(request: google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, callback: google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedClusterCallback): void; + + /** + * Calls DeleteAttachedCluster. + * @param request DeleteAttachedClusterRequest message or plain object + * @returns Promise + */ + public deleteAttachedCluster(request: google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest): Promise; + + /** + * Calls GetAttachedServerConfig. + * @param request GetAttachedServerConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AttachedServerConfig + */ + public getAttachedServerConfig(request: google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, callback: google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfigCallback): void; + + /** + * Calls GetAttachedServerConfig. + * @param request GetAttachedServerConfigRequest message or plain object + * @returns Promise + */ + public getAttachedServerConfig(request: google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest): Promise; + + /** + * Calls GenerateAttachedClusterInstallManifest. + * @param request GenerateAttachedClusterInstallManifestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateAttachedClusterInstallManifestResponse + */ + public generateAttachedClusterInstallManifest(request: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, callback: google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifestCallback): void; + + /** + * Calls GenerateAttachedClusterInstallManifest. + * @param request GenerateAttachedClusterInstallManifestRequest message or plain object + * @returns Promise + */ + public generateAttachedClusterInstallManifest(request: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest): Promise; + } + + namespace AttachedClusters { + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|createAttachedCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAttachedClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|updateAttachedCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAttachedClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|importAttachedCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportAttachedClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|getAttachedCluster}. + * @param error Error, if any + * @param [response] AttachedCluster + */ + type GetAttachedClusterCallback = (error: (Error|null), response?: google.cloud.gkemulticloud.v1.AttachedCluster) => void; + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|listAttachedClusters}. + * @param error Error, if any + * @param [response] ListAttachedClustersResponse + */ + type ListAttachedClustersCallback = (error: (Error|null), response?: google.cloud.gkemulticloud.v1.ListAttachedClustersResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|deleteAttachedCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAttachedClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|getAttachedServerConfig}. + * @param error Error, if any + * @param [response] AttachedServerConfig + */ + type GetAttachedServerConfigCallback = (error: (Error|null), response?: google.cloud.gkemulticloud.v1.AttachedServerConfig) => void; + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|generateAttachedClusterInstallManifest}. + * @param error Error, if any + * @param [response] GenerateAttachedClusterInstallManifestResponse + */ + type GenerateAttachedClusterInstallManifestCallback = (error: (Error|null), response?: google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse) => void; + } + + /** Properties of a GenerateAttachedClusterInstallManifestRequest. */ + interface IGenerateAttachedClusterInstallManifestRequest { + + /** GenerateAttachedClusterInstallManifestRequest parent */ + parent?: (string|null); + + /** GenerateAttachedClusterInstallManifestRequest attachedClusterId */ + attachedClusterId?: (string|null); + + /** GenerateAttachedClusterInstallManifestRequest platformVersion */ + platformVersion?: (string|null); + } + + /** Represents a GenerateAttachedClusterInstallManifestRequest. */ + class GenerateAttachedClusterInstallManifestRequest implements IGenerateAttachedClusterInstallManifestRequest { + + /** + * Constructs a new GenerateAttachedClusterInstallManifestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest); + + /** GenerateAttachedClusterInstallManifestRequest parent. */ + public parent: string; + + /** GenerateAttachedClusterInstallManifestRequest attachedClusterId. */ + public attachedClusterId: string; + + /** GenerateAttachedClusterInstallManifestRequest platformVersion. */ + public platformVersion: string; + + /** + * Creates a new GenerateAttachedClusterInstallManifestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateAttachedClusterInstallManifestRequest instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest): google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest; + + /** + * Encodes the specified GenerateAttachedClusterInstallManifestRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest.verify|verify} messages. + * @param message GenerateAttachedClusterInstallManifestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateAttachedClusterInstallManifestRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest.verify|verify} messages. + * @param message GenerateAttachedClusterInstallManifestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateAttachedClusterInstallManifestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateAttachedClusterInstallManifestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest; + + /** + * Decodes a GenerateAttachedClusterInstallManifestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateAttachedClusterInstallManifestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest; + + /** + * Verifies a GenerateAttachedClusterInstallManifestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateAttachedClusterInstallManifestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateAttachedClusterInstallManifestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest; + + /** + * Creates a plain object from a GenerateAttachedClusterInstallManifestRequest message. Also converts values to other types if specified. + * @param message GenerateAttachedClusterInstallManifestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateAttachedClusterInstallManifestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateAttachedClusterInstallManifestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateAttachedClusterInstallManifestResponse. */ + interface IGenerateAttachedClusterInstallManifestResponse { + + /** GenerateAttachedClusterInstallManifestResponse manifest */ + manifest?: (string|null); + } + + /** Represents a GenerateAttachedClusterInstallManifestResponse. */ + class GenerateAttachedClusterInstallManifestResponse implements IGenerateAttachedClusterInstallManifestResponse { + + /** + * Constructs a new GenerateAttachedClusterInstallManifestResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse); + + /** GenerateAttachedClusterInstallManifestResponse manifest. */ + public manifest: string; + + /** + * Creates a new GenerateAttachedClusterInstallManifestResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateAttachedClusterInstallManifestResponse instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse): google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse; + + /** + * Encodes the specified GenerateAttachedClusterInstallManifestResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse.verify|verify} messages. + * @param message GenerateAttachedClusterInstallManifestResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateAttachedClusterInstallManifestResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse.verify|verify} messages. + * @param message GenerateAttachedClusterInstallManifestResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateAttachedClusterInstallManifestResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateAttachedClusterInstallManifestResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse; + + /** + * Decodes a GenerateAttachedClusterInstallManifestResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateAttachedClusterInstallManifestResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse; + + /** + * Verifies a GenerateAttachedClusterInstallManifestResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateAttachedClusterInstallManifestResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateAttachedClusterInstallManifestResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse; + + /** + * Creates a plain object from a GenerateAttachedClusterInstallManifestResponse message. Also converts values to other types if specified. + * @param message GenerateAttachedClusterInstallManifestResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateAttachedClusterInstallManifestResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateAttachedClusterInstallManifestResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAttachedClusterRequest. */ + interface ICreateAttachedClusterRequest { + + /** CreateAttachedClusterRequest parent */ + parent?: (string|null); + + /** CreateAttachedClusterRequest attachedCluster */ + attachedCluster?: (google.cloud.gkemulticloud.v1.IAttachedCluster|null); + + /** CreateAttachedClusterRequest attachedClusterId */ + attachedClusterId?: (string|null); + + /** CreateAttachedClusterRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateAttachedClusterRequest. */ + class CreateAttachedClusterRequest implements ICreateAttachedClusterRequest { + + /** + * Constructs a new CreateAttachedClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest); + + /** CreateAttachedClusterRequest parent. */ + public parent: string; + + /** CreateAttachedClusterRequest attachedCluster. */ + public attachedCluster?: (google.cloud.gkemulticloud.v1.IAttachedCluster|null); + + /** CreateAttachedClusterRequest attachedClusterId. */ + public attachedClusterId: string; + + /** CreateAttachedClusterRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateAttachedClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAttachedClusterRequest instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest): google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest; + + /** + * Encodes the specified CreateAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.verify|verify} messages. + * @param message CreateAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.verify|verify} messages. + * @param message CreateAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAttachedClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest; + + /** + * Decodes a CreateAttachedClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest; + + /** + * Verifies a CreateAttachedClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAttachedClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest; + + /** + * Creates a plain object from a CreateAttachedClusterRequest message. Also converts values to other types if specified. + * @param message CreateAttachedClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAttachedClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAttachedClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportAttachedClusterRequest. */ + interface IImportAttachedClusterRequest { + + /** ImportAttachedClusterRequest parent */ + parent?: (string|null); + + /** ImportAttachedClusterRequest validateOnly */ + validateOnly?: (boolean|null); + + /** ImportAttachedClusterRequest fleetMembership */ + fleetMembership?: (string|null); + + /** ImportAttachedClusterRequest platformVersion */ + platformVersion?: (string|null); + + /** ImportAttachedClusterRequest distribution */ + distribution?: (string|null); + } + + /** Represents an ImportAttachedClusterRequest. */ + class ImportAttachedClusterRequest implements IImportAttachedClusterRequest { + + /** + * Constructs a new ImportAttachedClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest); + + /** ImportAttachedClusterRequest parent. */ + public parent: string; + + /** ImportAttachedClusterRequest validateOnly. */ + public validateOnly: boolean; + + /** ImportAttachedClusterRequest fleetMembership. */ + public fleetMembership: string; + + /** ImportAttachedClusterRequest platformVersion. */ + public platformVersion: string; + + /** ImportAttachedClusterRequest distribution. */ + public distribution: string; + + /** + * Creates a new ImportAttachedClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportAttachedClusterRequest instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest): google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest; + + /** + * Encodes the specified ImportAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.verify|verify} messages. + * @param message ImportAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.verify|verify} messages. + * @param message ImportAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportAttachedClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest; + + /** + * Decodes an ImportAttachedClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest; + + /** + * Verifies an ImportAttachedClusterRequest message. + * @param message Plain 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 ImportAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportAttachedClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest; + + /** + * Creates a plain object from an ImportAttachedClusterRequest message. Also converts values to other types if specified. + * @param message ImportAttachedClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportAttachedClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportAttachedClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAttachedClusterRequest. */ + interface IUpdateAttachedClusterRequest { + + /** UpdateAttachedClusterRequest attachedCluster */ + attachedCluster?: (google.cloud.gkemulticloud.v1.IAttachedCluster|null); + + /** UpdateAttachedClusterRequest validateOnly */ + validateOnly?: (boolean|null); + + /** UpdateAttachedClusterRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateAttachedClusterRequest. */ + class UpdateAttachedClusterRequest implements IUpdateAttachedClusterRequest { + + /** + * Constructs a new UpdateAttachedClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest); + + /** UpdateAttachedClusterRequest attachedCluster. */ + public attachedCluster?: (google.cloud.gkemulticloud.v1.IAttachedCluster|null); + + /** UpdateAttachedClusterRequest validateOnly. */ + public validateOnly: boolean; + + /** UpdateAttachedClusterRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateAttachedClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAttachedClusterRequest instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest): google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest; + + /** + * Encodes the specified UpdateAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.verify|verify} messages. + * @param message UpdateAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.verify|verify} messages. + * @param message UpdateAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAttachedClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest; + + /** + * Decodes an UpdateAttachedClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest; + + /** + * Verifies an UpdateAttachedClusterRequest message. + * @param message Plain 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 UpdateAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAttachedClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest; + + /** + * Creates a plain object from an UpdateAttachedClusterRequest message. Also converts values to other types if specified. + * @param message UpdateAttachedClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAttachedClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAttachedClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAttachedClusterRequest. */ + interface IGetAttachedClusterRequest { + + /** GetAttachedClusterRequest name */ + name?: (string|null); + } + + /** Represents a GetAttachedClusterRequest. */ + class GetAttachedClusterRequest implements IGetAttachedClusterRequest { + + /** + * Constructs a new GetAttachedClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest); + + /** GetAttachedClusterRequest name. */ + public name: string; + + /** + * Creates a new GetAttachedClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAttachedClusterRequest instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest): google.cloud.gkemulticloud.v1.GetAttachedClusterRequest; + + /** + * Encodes the specified GetAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAttachedClusterRequest.verify|verify} messages. + * @param message GetAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAttachedClusterRequest.verify|verify} messages. + * @param message GetAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAttachedClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.GetAttachedClusterRequest; + + /** + * Decodes a GetAttachedClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.GetAttachedClusterRequest; + + /** + * Verifies a GetAttachedClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAttachedClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.GetAttachedClusterRequest; + + /** + * Creates a plain object from a GetAttachedClusterRequest message. Also converts values to other types if specified. + * @param message GetAttachedClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.GetAttachedClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAttachedClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAttachedClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAttachedClustersRequest. */ + interface IListAttachedClustersRequest { + + /** ListAttachedClustersRequest parent */ + parent?: (string|null); + + /** ListAttachedClustersRequest pageSize */ + pageSize?: (number|null); + + /** ListAttachedClustersRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAttachedClustersRequest. */ + class ListAttachedClustersRequest implements IListAttachedClustersRequest { + + /** + * Constructs a new ListAttachedClustersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IListAttachedClustersRequest); + + /** ListAttachedClustersRequest parent. */ + public parent: string; + + /** ListAttachedClustersRequest pageSize. */ + public pageSize: number; + + /** ListAttachedClustersRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAttachedClustersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAttachedClustersRequest instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IListAttachedClustersRequest): google.cloud.gkemulticloud.v1.ListAttachedClustersRequest; + + /** + * Encodes the specified ListAttachedClustersRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAttachedClustersRequest.verify|verify} messages. + * @param message ListAttachedClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAttachedClustersRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAttachedClustersRequest.verify|verify} messages. + * @param message ListAttachedClustersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAttachedClustersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAttachedClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.ListAttachedClustersRequest; + + /** + * Decodes a ListAttachedClustersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAttachedClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.ListAttachedClustersRequest; + + /** + * Verifies a ListAttachedClustersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAttachedClustersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAttachedClustersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.ListAttachedClustersRequest; + + /** + * Creates a plain object from a ListAttachedClustersRequest message. Also converts values to other types if specified. + * @param message ListAttachedClustersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.ListAttachedClustersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAttachedClustersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAttachedClustersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAttachedClustersResponse. */ + interface IListAttachedClustersResponse { + + /** ListAttachedClustersResponse attachedClusters */ + attachedClusters?: (google.cloud.gkemulticloud.v1.IAttachedCluster[]|null); + + /** ListAttachedClustersResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAttachedClustersResponse. */ + class ListAttachedClustersResponse implements IListAttachedClustersResponse { + + /** + * Constructs a new ListAttachedClustersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IListAttachedClustersResponse); + + /** ListAttachedClustersResponse attachedClusters. */ + public attachedClusters: google.cloud.gkemulticloud.v1.IAttachedCluster[]; + + /** ListAttachedClustersResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAttachedClustersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAttachedClustersResponse instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IListAttachedClustersResponse): google.cloud.gkemulticloud.v1.ListAttachedClustersResponse; + + /** + * Encodes the specified ListAttachedClustersResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.verify|verify} messages. + * @param message ListAttachedClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IListAttachedClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAttachedClustersResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.verify|verify} messages. + * @param message ListAttachedClustersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IListAttachedClustersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAttachedClustersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAttachedClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.ListAttachedClustersResponse; + + /** + * Decodes a ListAttachedClustersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAttachedClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.ListAttachedClustersResponse; + + /** + * Verifies a ListAttachedClustersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAttachedClustersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAttachedClustersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.ListAttachedClustersResponse; + + /** + * Creates a plain object from a ListAttachedClustersResponse message. Also converts values to other types if specified. + * @param message ListAttachedClustersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.ListAttachedClustersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAttachedClustersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAttachedClustersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAttachedClusterRequest. */ + interface IDeleteAttachedClusterRequest { + + /** DeleteAttachedClusterRequest name */ + name?: (string|null); + + /** DeleteAttachedClusterRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteAttachedClusterRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteAttachedClusterRequest ignoreErrors */ + ignoreErrors?: (boolean|null); + + /** DeleteAttachedClusterRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteAttachedClusterRequest. */ + class DeleteAttachedClusterRequest implements IDeleteAttachedClusterRequest { + + /** + * Constructs a new DeleteAttachedClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest); + + /** DeleteAttachedClusterRequest name. */ + public name: string; + + /** DeleteAttachedClusterRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteAttachedClusterRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteAttachedClusterRequest ignoreErrors. */ + public ignoreErrors: boolean; + + /** DeleteAttachedClusterRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteAttachedClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAttachedClusterRequest instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest): google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest; + + /** + * Encodes the specified DeleteAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.verify|verify} messages. + * @param message DeleteAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.verify|verify} messages. + * @param message DeleteAttachedClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAttachedClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest; + + /** + * Decodes a DeleteAttachedClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest; + + /** + * Verifies a DeleteAttachedClusterRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAttachedClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest; + + /** + * Creates a plain object from a DeleteAttachedClusterRequest message. Also converts values to other types if specified. + * @param message DeleteAttachedClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAttachedClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAttachedClusterRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAttachedServerConfigRequest. */ + interface IGetAttachedServerConfigRequest { + + /** GetAttachedServerConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetAttachedServerConfigRequest. */ + class GetAttachedServerConfigRequest implements IGetAttachedServerConfigRequest { + + /** + * Constructs a new GetAttachedServerConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest); + + /** GetAttachedServerConfigRequest name. */ + public name: string; + + /** + * Creates a new GetAttachedServerConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAttachedServerConfigRequest instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest): google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest; + + /** + * Encodes the specified GetAttachedServerConfigRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest.verify|verify} messages. + * @param message GetAttachedServerConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAttachedServerConfigRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest.verify|verify} messages. + * @param message GetAttachedServerConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAttachedServerConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAttachedServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest; + + /** + * Decodes a GetAttachedServerConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAttachedServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest; + + /** + * Verifies a GetAttachedServerConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAttachedServerConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAttachedServerConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest; + + /** + * Creates a plain object from a GetAttachedServerConfigRequest message. Also converts values to other types if specified. + * @param message GetAttachedServerConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAttachedServerConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAttachedServerConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsCluster. */ + interface IAwsCluster { + + /** AwsCluster name */ + name?: (string|null); + + /** AwsCluster description */ + description?: (string|null); + + /** AwsCluster networking */ + networking?: (google.cloud.gkemulticloud.v1.IAwsClusterNetworking|null); + + /** AwsCluster awsRegion */ + awsRegion?: (string|null); + + /** AwsCluster controlPlane */ + controlPlane?: (google.cloud.gkemulticloud.v1.IAwsControlPlane|null); + + /** AwsCluster authorization */ + authorization?: (google.cloud.gkemulticloud.v1.IAwsAuthorization|null); + + /** AwsCluster state */ + state?: (google.cloud.gkemulticloud.v1.AwsCluster.State|keyof typeof google.cloud.gkemulticloud.v1.AwsCluster.State|null); + + /** AwsCluster endpoint */ + endpoint?: (string|null); + + /** AwsCluster uid */ + uid?: (string|null); + + /** AwsCluster reconciling */ + reconciling?: (boolean|null); + + /** AwsCluster createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** AwsCluster updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AwsCluster etag */ + etag?: (string|null); + + /** AwsCluster annotations */ + annotations?: ({ [k: string]: string }|null); + + /** AwsCluster workloadIdentityConfig */ + workloadIdentityConfig?: (google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null); + + /** AwsCluster clusterCaCertificate */ + clusterCaCertificate?: (string|null); + + /** AwsCluster fleet */ + fleet?: (google.cloud.gkemulticloud.v1.IFleet|null); + + /** AwsCluster loggingConfig */ + loggingConfig?: (google.cloud.gkemulticloud.v1.ILoggingConfig|null); + + /** AwsCluster errors */ + errors?: (google.cloud.gkemulticloud.v1.IAwsClusterError[]|null); + + /** AwsCluster monitoringConfig */ + monitoringConfig?: (google.cloud.gkemulticloud.v1.IMonitoringConfig|null); + } + + /** Represents an AwsCluster. */ + class AwsCluster implements IAwsCluster { + + /** + * Constructs a new AwsCluster. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsCluster); + + /** AwsCluster name. */ + public name: string; + + /** AwsCluster description. */ + public description: string; + + /** AwsCluster networking. */ + public networking?: (google.cloud.gkemulticloud.v1.IAwsClusterNetworking|null); + + /** AwsCluster awsRegion. */ + public awsRegion: string; + + /** AwsCluster controlPlane. */ + public controlPlane?: (google.cloud.gkemulticloud.v1.IAwsControlPlane|null); + + /** AwsCluster authorization. */ + public authorization?: (google.cloud.gkemulticloud.v1.IAwsAuthorization|null); + + /** AwsCluster state. */ + public state: (google.cloud.gkemulticloud.v1.AwsCluster.State|keyof typeof google.cloud.gkemulticloud.v1.AwsCluster.State); + + /** AwsCluster endpoint. */ + public endpoint: string; + + /** AwsCluster uid. */ + public uid: string; + + /** AwsCluster reconciling. */ + public reconciling: boolean; + + /** AwsCluster createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** AwsCluster updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AwsCluster etag. */ + public etag: string; + + /** AwsCluster annotations. */ + public annotations: { [k: string]: string }; + + /** AwsCluster workloadIdentityConfig. */ + public workloadIdentityConfig?: (google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null); + + /** AwsCluster clusterCaCertificate. */ + public clusterCaCertificate: string; + + /** AwsCluster fleet. */ + public fleet?: (google.cloud.gkemulticloud.v1.IFleet|null); + + /** AwsCluster loggingConfig. */ + public loggingConfig?: (google.cloud.gkemulticloud.v1.ILoggingConfig|null); + + /** AwsCluster errors. */ + public errors: google.cloud.gkemulticloud.v1.IAwsClusterError[]; + + /** AwsCluster monitoringConfig. */ + public monitoringConfig?: (google.cloud.gkemulticloud.v1.IMonitoringConfig|null); + + /** + * Creates a new AwsCluster instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsCluster instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsCluster): google.cloud.gkemulticloud.v1.AwsCluster; + + /** + * Encodes the specified AwsCluster message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsCluster.verify|verify} messages. + * @param message AwsCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IAwsCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsCluster message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsCluster.verify|verify} messages. + * @param message AwsCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsCluster message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsCluster; + + /** + * Decodes an AwsCluster message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsCluster; + + /** + * Verifies an AwsCluster message. + * @param message Plain 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 AwsCluster message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsCluster + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsCluster; + + /** + * Creates a plain object from an AwsCluster message. Also converts values to other types if specified. + * @param message AwsCluster + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.AwsCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsCluster to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsCluster + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AwsCluster { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PROVISIONING = 1, + RUNNING = 2, + RECONCILING = 3, + STOPPING = 4, + ERROR = 5, + DEGRADED = 6 + } + } + + /** Properties of an AwsControlPlane. */ + interface IAwsControlPlane { + + /** AwsControlPlane version */ + version?: (string|null); + + /** AwsControlPlane instanceType */ + instanceType?: (string|null); + + /** AwsControlPlane sshConfig */ + sshConfig?: (google.cloud.gkemulticloud.v1.IAwsSshConfig|null); + + /** AwsControlPlane subnetIds */ + subnetIds?: (string[]|null); + + /** AwsControlPlane securityGroupIds */ + securityGroupIds?: (string[]|null); + + /** AwsControlPlane iamInstanceProfile */ + iamInstanceProfile?: (string|null); + + /** AwsControlPlane rootVolume */ + rootVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); + + /** AwsControlPlane mainVolume */ + mainVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); + + /** AwsControlPlane databaseEncryption */ + databaseEncryption?: (google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption|null); + + /** AwsControlPlane tags */ + tags?: ({ [k: string]: string }|null); + + /** AwsControlPlane awsServicesAuthentication */ + awsServicesAuthentication?: (google.cloud.gkemulticloud.v1.IAwsServicesAuthentication|null); + + /** AwsControlPlane proxyConfig */ + proxyConfig?: (google.cloud.gkemulticloud.v1.IAwsProxyConfig|null); + + /** AwsControlPlane configEncryption */ + configEncryption?: (google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null); + + /** AwsControlPlane instancePlacement */ + instancePlacement?: (google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null); + } + + /** Represents an AwsControlPlane. */ + class AwsControlPlane implements IAwsControlPlane { + + /** + * Constructs a new AwsControlPlane. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsControlPlane); + + /** AwsControlPlane version. */ + public version: string; + + /** AwsControlPlane instanceType. */ + public instanceType: string; + + /** AwsControlPlane sshConfig. */ + public sshConfig?: (google.cloud.gkemulticloud.v1.IAwsSshConfig|null); + + /** AwsControlPlane subnetIds. */ + public subnetIds: string[]; + + /** AwsControlPlane securityGroupIds. */ + public securityGroupIds: string[]; + + /** AwsControlPlane iamInstanceProfile. */ + public iamInstanceProfile: string; + + /** AwsControlPlane rootVolume. */ + public rootVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); + + /** AwsControlPlane mainVolume. */ + public mainVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); + + /** AwsControlPlane databaseEncryption. */ + public databaseEncryption?: (google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption|null); + + /** AwsControlPlane tags. */ + public tags: { [k: string]: string }; + + /** AwsControlPlane awsServicesAuthentication. */ + public awsServicesAuthentication?: (google.cloud.gkemulticloud.v1.IAwsServicesAuthentication|null); + + /** AwsControlPlane proxyConfig. */ + public proxyConfig?: (google.cloud.gkemulticloud.v1.IAwsProxyConfig|null); + + /** AwsControlPlane configEncryption. */ + public configEncryption?: (google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null); + + /** AwsControlPlane instancePlacement. */ + public instancePlacement?: (google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null); + + /** + * Creates a new AwsControlPlane instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsControlPlane instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsControlPlane): google.cloud.gkemulticloud.v1.AwsControlPlane; + + /** + * Encodes the specified AwsControlPlane message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsControlPlane.verify|verify} messages. + * @param message AwsControlPlane message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IAwsControlPlane, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsControlPlane message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsControlPlane.verify|verify} messages. + * @param message AwsControlPlane message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsControlPlane, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsControlPlane message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsControlPlane + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsControlPlane; + + /** + * Decodes an AwsControlPlane message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsControlPlane + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsControlPlane; + + /** + * Verifies an AwsControlPlane message. + * @param message Plain 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 AwsControlPlane message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsControlPlane + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsControlPlane; + + /** + * Creates a plain object from an AwsControlPlane message. Also converts values to other types if specified. + * @param message AwsControlPlane + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.AwsControlPlane, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsControlPlane to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsControlPlane + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsServicesAuthentication. */ + interface IAwsServicesAuthentication { + + /** AwsServicesAuthentication roleArn */ + roleArn?: (string|null); + + /** AwsServicesAuthentication roleSessionName */ + roleSessionName?: (string|null); + } + + /** Represents an AwsServicesAuthentication. */ + class AwsServicesAuthentication implements IAwsServicesAuthentication { + + /** + * Constructs a new AwsServicesAuthentication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsServicesAuthentication); + + /** AwsServicesAuthentication roleArn. */ + public roleArn: string; + + /** AwsServicesAuthentication roleSessionName. */ + public roleSessionName: string; + + /** + * Creates a new AwsServicesAuthentication instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsServicesAuthentication instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsServicesAuthentication): google.cloud.gkemulticloud.v1.AwsServicesAuthentication; + + /** + * Encodes the specified AwsServicesAuthentication message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify|verify} messages. + * @param message AwsServicesAuthentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IAwsServicesAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsServicesAuthentication message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify|verify} messages. + * @param message AwsServicesAuthentication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsServicesAuthentication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsServicesAuthentication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsServicesAuthentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsServicesAuthentication; + + /** + * Decodes an AwsServicesAuthentication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsServicesAuthentication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsServicesAuthentication; + + /** + * Verifies an AwsServicesAuthentication message. + * @param message Plain 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 AwsServicesAuthentication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsServicesAuthentication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsServicesAuthentication; + + /** + * Creates a plain object from an AwsServicesAuthentication message. Also converts values to other types if specified. + * @param message AwsServicesAuthentication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.AwsServicesAuthentication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsServicesAuthentication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsServicesAuthentication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsAuthorization. */ + interface IAwsAuthorization { + + /** AwsAuthorization adminUsers */ + adminUsers?: (google.cloud.gkemulticloud.v1.IAwsClusterUser[]|null); + } + + /** Represents an AwsAuthorization. */ + class AwsAuthorization implements IAwsAuthorization { + + /** + * Constructs a new AwsAuthorization. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsAuthorization); + + /** AwsAuthorization adminUsers. */ + public adminUsers: google.cloud.gkemulticloud.v1.IAwsClusterUser[]; + + /** + * Creates a new AwsAuthorization instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsAuthorization instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsAuthorization): google.cloud.gkemulticloud.v1.AwsAuthorization; + + /** + * Encodes the specified AwsAuthorization message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAuthorization.verify|verify} messages. + * @param message AwsAuthorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IAwsAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsAuthorization message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAuthorization.verify|verify} messages. + * @param message AwsAuthorization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsAuthorization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsAuthorization; + + /** + * Decodes an AwsAuthorization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsAuthorization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsAuthorization; + + /** + * Verifies an AwsAuthorization message. + * @param message Plain 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 AwsAuthorization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsAuthorization + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsAuthorization; + + /** + * Creates a plain object from an AwsAuthorization message. Also converts values to other types if specified. + * @param message AwsAuthorization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.AwsAuthorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AwsNodePool uid. */ - public uid: string; + /** + * Converts this AwsAuthorization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** AwsNodePool reconciling. */ - public reconciling: boolean; + /** + * Gets the default type url for AwsAuthorization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** AwsNodePool createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Properties of an AwsClusterUser. */ + interface IAwsClusterUser { - /** AwsNodePool updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** AwsClusterUser username */ + username?: (string|null); + } - /** AwsNodePool etag. */ - public etag: string; + /** Represents an AwsClusterUser. */ + class AwsClusterUser implements IAwsClusterUser { - /** AwsNodePool annotations. */ - public annotations: { [k: string]: string }; + /** + * Constructs a new AwsClusterUser. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsClusterUser); - /** AwsNodePool maxPodsConstraint. */ - public maxPodsConstraint?: (google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null); + /** AwsClusterUser username. */ + public username: string; /** - * Creates a new AwsNodePool instance using the specified properties. + * Creates a new AwsClusterUser instance using the specified properties. * @param [properties] Properties to set - * @returns AwsNodePool instance + * @returns AwsClusterUser instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsNodePool): google.cloud.gkemulticloud.v1.AwsNodePool; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsClusterUser): google.cloud.gkemulticloud.v1.AwsClusterUser; /** - * Encodes the specified AwsNodePool message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePool.verify|verify} messages. - * @param message AwsNodePool message or plain object to encode + * Encodes the specified AwsClusterUser message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterUser.verify|verify} messages. + * @param message AwsClusterUser message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsNodePool, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsClusterUser, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsNodePool message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePool.verify|verify} messages. - * @param message AwsNodePool message or plain object to encode + * Encodes the specified AwsClusterUser message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterUser.verify|verify} messages. + * @param message AwsClusterUser message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsNodePool, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsClusterUser, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsNodePool message from the specified reader or buffer. + * Decodes an AwsClusterUser message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsNodePool + * @returns AwsClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsNodePool; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsClusterUser; /** - * Decodes an AwsNodePool message from the specified reader or buffer, length delimited. + * Decodes an AwsClusterUser message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsNodePool + * @returns AwsClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsNodePool; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsClusterUser; /** - * Verifies an AwsNodePool message. + * Verifies an AwsClusterUser message. * @param message Plain 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 AwsNodePool message from a plain object. Also converts values to their respective internal types. + * Creates an AwsClusterUser message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsNodePool + * @returns AwsClusterUser */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsNodePool; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsClusterUser; /** - * Creates a plain object from an AwsNodePool message. Also converts values to other types if specified. - * @param message AwsNodePool + * Creates a plain object from an AwsClusterUser message. Also converts values to other types if specified. + * @param message AwsClusterUser * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsNodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsClusterUser, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsNodePool to JSON. + * Converts this AwsClusterUser to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsNodePool + * Gets the default type url for AwsClusterUser * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AwsNodePool { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PROVISIONING = 1, - RUNNING = 2, - RECONCILING = 3, - STOPPING = 4, - ERROR = 5, - DEGRADED = 6 - } - } - - /** Properties of an AwsNodeConfig. */ - interface IAwsNodeConfig { - - /** AwsNodeConfig instanceType */ - instanceType?: (string|null); - - /** AwsNodeConfig rootVolume */ - rootVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); - - /** AwsNodeConfig taints */ - taints?: (google.cloud.gkemulticloud.v1.INodeTaint[]|null); - - /** AwsNodeConfig labels */ - labels?: ({ [k: string]: string }|null); - - /** AwsNodeConfig tags */ - tags?: ({ [k: string]: string }|null); - - /** AwsNodeConfig iamInstanceProfile */ - iamInstanceProfile?: (string|null); - - /** AwsNodeConfig imageType */ - imageType?: (string|null); - - /** AwsNodeConfig sshConfig */ - sshConfig?: (google.cloud.gkemulticloud.v1.IAwsSshConfig|null); - - /** AwsNodeConfig securityGroupIds */ - securityGroupIds?: (string[]|null); - - /** AwsNodeConfig proxyConfig */ - proxyConfig?: (google.cloud.gkemulticloud.v1.IAwsProxyConfig|null); - - /** AwsNodeConfig configEncryption */ - configEncryption?: (google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null); + /** Properties of an AwsDatabaseEncryption. */ + interface IAwsDatabaseEncryption { - /** AwsNodeConfig instancePlacement */ - instancePlacement?: (google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null); + /** AwsDatabaseEncryption kmsKeyArn */ + kmsKeyArn?: (string|null); } - /** Represents an AwsNodeConfig. */ - class AwsNodeConfig implements IAwsNodeConfig { + /** Represents an AwsDatabaseEncryption. */ + class AwsDatabaseEncryption implements IAwsDatabaseEncryption { /** - * Constructs a new AwsNodeConfig. + * Constructs a new AwsDatabaseEncryption. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsNodeConfig); - - /** AwsNodeConfig instanceType. */ - public instanceType: string; - - /** AwsNodeConfig rootVolume. */ - public rootVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); - - /** AwsNodeConfig taints. */ - public taints: google.cloud.gkemulticloud.v1.INodeTaint[]; - - /** AwsNodeConfig labels. */ - public labels: { [k: string]: string }; - - /** AwsNodeConfig tags. */ - public tags: { [k: string]: string }; - - /** AwsNodeConfig iamInstanceProfile. */ - public iamInstanceProfile: string; - - /** AwsNodeConfig imageType. */ - public imageType: string; - - /** AwsNodeConfig sshConfig. */ - public sshConfig?: (google.cloud.gkemulticloud.v1.IAwsSshConfig|null); - - /** AwsNodeConfig securityGroupIds. */ - public securityGroupIds: string[]; - - /** AwsNodeConfig proxyConfig. */ - public proxyConfig?: (google.cloud.gkemulticloud.v1.IAwsProxyConfig|null); - - /** AwsNodeConfig configEncryption. */ - public configEncryption?: (google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption); - /** AwsNodeConfig instancePlacement. */ - public instancePlacement?: (google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null); + /** AwsDatabaseEncryption kmsKeyArn. */ + public kmsKeyArn: string; /** - * Creates a new AwsNodeConfig instance using the specified properties. + * Creates a new AwsDatabaseEncryption instance using the specified properties. * @param [properties] Properties to set - * @returns AwsNodeConfig instance + * @returns AwsDatabaseEncryption instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsNodeConfig): google.cloud.gkemulticloud.v1.AwsNodeConfig; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption): google.cloud.gkemulticloud.v1.AwsDatabaseEncryption; /** - * Encodes the specified AwsNodeConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodeConfig.verify|verify} messages. - * @param message AwsNodeConfig message or plain object to encode + * Encodes the specified AwsDatabaseEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify|verify} messages. + * @param message AwsDatabaseEncryption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsNodeConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodeConfig.verify|verify} messages. - * @param message AwsNodeConfig message or plain object to encode + * Encodes the specified AwsDatabaseEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify|verify} messages. + * @param message AwsDatabaseEncryption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsNodeConfig message from the specified reader or buffer. + * Decodes an AwsDatabaseEncryption message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsNodeConfig + * @returns AwsDatabaseEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsNodeConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsDatabaseEncryption; /** - * Decodes an AwsNodeConfig message from the specified reader or buffer, length delimited. + * Decodes an AwsDatabaseEncryption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsNodeConfig + * @returns AwsDatabaseEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsNodeConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsDatabaseEncryption; /** - * Verifies an AwsNodeConfig message. + * Verifies an AwsDatabaseEncryption message. * @param message Plain 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 AwsNodeConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AwsDatabaseEncryption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsNodeConfig + * @returns AwsDatabaseEncryption */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsNodeConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsDatabaseEncryption; /** - * Creates a plain object from an AwsNodeConfig message. Also converts values to other types if specified. - * @param message AwsNodeConfig + * Creates a plain object from an AwsDatabaseEncryption message. Also converts values to other types if specified. + * @param message AwsDatabaseEncryption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsDatabaseEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsNodeConfig to JSON. + * Converts this AwsDatabaseEncryption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsNodeConfig + * Gets the default type url for AwsDatabaseEncryption * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsNodePoolAutoscaling. */ - interface IAwsNodePoolAutoscaling { + /** Properties of an AwsVolumeTemplate. */ + interface IAwsVolumeTemplate { - /** AwsNodePoolAutoscaling minNodeCount */ - minNodeCount?: (number|null); + /** AwsVolumeTemplate sizeGib */ + sizeGib?: (number|null); - /** AwsNodePoolAutoscaling maxNodeCount */ - maxNodeCount?: (number|null); + /** AwsVolumeTemplate volumeType */ + volumeType?: (google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType|keyof typeof google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType|null); + + /** AwsVolumeTemplate iops */ + iops?: (number|null); + + /** AwsVolumeTemplate kmsKeyArn */ + kmsKeyArn?: (string|null); } - /** Represents an AwsNodePoolAutoscaling. */ - class AwsNodePoolAutoscaling implements IAwsNodePoolAutoscaling { + /** Represents an AwsVolumeTemplate. */ + class AwsVolumeTemplate implements IAwsVolumeTemplate { /** - * Constructs a new AwsNodePoolAutoscaling. + * Constructs a new AwsVolumeTemplate. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsVolumeTemplate); - /** AwsNodePoolAutoscaling minNodeCount. */ - public minNodeCount: number; + /** AwsVolumeTemplate sizeGib. */ + public sizeGib: number; - /** AwsNodePoolAutoscaling maxNodeCount. */ - public maxNodeCount: number; + /** AwsVolumeTemplate volumeType. */ + public volumeType: (google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType|keyof typeof google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType); + + /** AwsVolumeTemplate iops. */ + public iops: number; + + /** AwsVolumeTemplate kmsKeyArn. */ + public kmsKeyArn: string; /** - * Creates a new AwsNodePoolAutoscaling instance using the specified properties. + * Creates a new AwsVolumeTemplate instance using the specified properties. * @param [properties] Properties to set - * @returns AwsNodePoolAutoscaling instance + * @returns AwsVolumeTemplate instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling): google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsVolumeTemplate): google.cloud.gkemulticloud.v1.AwsVolumeTemplate; /** - * Encodes the specified AwsNodePoolAutoscaling message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify|verify} messages. - * @param message AwsNodePoolAutoscaling message or plain object to encode + * Encodes the specified AwsVolumeTemplate message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify|verify} messages. + * @param message AwsVolumeTemplate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsVolumeTemplate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsNodePoolAutoscaling message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify|verify} messages. - * @param message AwsNodePoolAutoscaling message or plain object to encode + * Encodes the specified AwsVolumeTemplate message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify|verify} messages. + * @param message AwsVolumeTemplate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsVolumeTemplate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsNodePoolAutoscaling message from the specified reader or buffer. + * Decodes an AwsVolumeTemplate message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsNodePoolAutoscaling + * @returns AwsVolumeTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsVolumeTemplate; /** - * Decodes an AwsNodePoolAutoscaling message from the specified reader or buffer, length delimited. + * Decodes an AwsVolumeTemplate message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsNodePoolAutoscaling + * @returns AwsVolumeTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsVolumeTemplate; /** - * Verifies an AwsNodePoolAutoscaling message. + * Verifies an AwsVolumeTemplate message. * @param message Plain 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 AwsNodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. + * Creates an AwsVolumeTemplate message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsNodePoolAutoscaling + * @returns AwsVolumeTemplate */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsVolumeTemplate; /** - * Creates a plain object from an AwsNodePoolAutoscaling message. Also converts values to other types if specified. - * @param message AwsNodePoolAutoscaling + * Creates a plain object from an AwsVolumeTemplate message. Also converts values to other types if specified. + * @param message AwsVolumeTemplate * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsVolumeTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsNodePoolAutoscaling to JSON. + * Converts this AwsVolumeTemplate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsNodePoolAutoscaling + * Gets the default type url for AwsVolumeTemplate * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsServerConfig. */ - interface IAwsServerConfig { + namespace AwsVolumeTemplate { - /** AwsServerConfig name */ - name?: (string|null); + /** VolumeType enum. */ + enum VolumeType { + VOLUME_TYPE_UNSPECIFIED = 0, + GP2 = 1, + GP3 = 2 + } + } - /** AwsServerConfig validVersions */ - validVersions?: (google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo[]|null); + /** Properties of an AwsClusterNetworking. */ + interface IAwsClusterNetworking { - /** AwsServerConfig supportedAwsRegions */ - supportedAwsRegions?: (string[]|null); + /** AwsClusterNetworking vpcId */ + vpcId?: (string|null); + + /** AwsClusterNetworking podAddressCidrBlocks */ + podAddressCidrBlocks?: (string[]|null); + + /** AwsClusterNetworking serviceAddressCidrBlocks */ + serviceAddressCidrBlocks?: (string[]|null); } - /** Represents an AwsServerConfig. */ - class AwsServerConfig implements IAwsServerConfig { + /** Represents an AwsClusterNetworking. */ + class AwsClusterNetworking implements IAwsClusterNetworking { /** - * Constructs a new AwsServerConfig. + * Constructs a new AwsClusterNetworking. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsServerConfig); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsClusterNetworking); - /** AwsServerConfig name. */ - public name: string; + /** AwsClusterNetworking vpcId. */ + public vpcId: string; - /** AwsServerConfig validVersions. */ - public validVersions: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo[]; + /** AwsClusterNetworking podAddressCidrBlocks. */ + public podAddressCidrBlocks: string[]; - /** AwsServerConfig supportedAwsRegions. */ - public supportedAwsRegions: string[]; + /** AwsClusterNetworking serviceAddressCidrBlocks. */ + public serviceAddressCidrBlocks: string[]; /** - * Creates a new AwsServerConfig instance using the specified properties. + * Creates a new AwsClusterNetworking instance using the specified properties. * @param [properties] Properties to set - * @returns AwsServerConfig instance + * @returns AwsClusterNetworking instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsServerConfig): google.cloud.gkemulticloud.v1.AwsServerConfig; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsClusterNetworking): google.cloud.gkemulticloud.v1.AwsClusterNetworking; /** - * Encodes the specified AwsServerConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServerConfig.verify|verify} messages. - * @param message AwsServerConfig message or plain object to encode + * Encodes the specified AwsClusterNetworking message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify|verify} messages. + * @param message AwsClusterNetworking message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsClusterNetworking, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsServerConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServerConfig.verify|verify} messages. - * @param message AwsServerConfig message or plain object to encode + * Encodes the specified AwsClusterNetworking message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify|verify} messages. + * @param message AwsClusterNetworking message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsClusterNetworking, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsServerConfig message from the specified reader or buffer. + * Decodes an AwsClusterNetworking message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsServerConfig + * @returns AwsClusterNetworking * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsServerConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsClusterNetworking; /** - * Decodes an AwsServerConfig message from the specified reader or buffer, length delimited. + * Decodes an AwsClusterNetworking message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsServerConfig + * @returns AwsClusterNetworking * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsServerConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsClusterNetworking; /** - * Verifies an AwsServerConfig message. + * Verifies an AwsClusterNetworking message. * @param message Plain 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 AwsServerConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AwsClusterNetworking message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsServerConfig + * @returns AwsClusterNetworking */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsServerConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsClusterNetworking; /** - * Creates a plain object from an AwsServerConfig message. Also converts values to other types if specified. - * @param message AwsServerConfig + * Creates a plain object from an AwsClusterNetworking message. Also converts values to other types if specified. + * @param message AwsClusterNetworking * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsClusterNetworking, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsServerConfig to JSON. + * Converts this AwsClusterNetworking to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsServerConfig + * Gets the default type url for AwsClusterNetworking * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsK8sVersionInfo. */ - interface IAwsK8sVersionInfo { + /** Properties of an AwsNodePool. */ + interface IAwsNodePool { - /** AwsK8sVersionInfo version */ + /** AwsNodePool name */ + name?: (string|null); + + /** AwsNodePool version */ version?: (string|null); + + /** AwsNodePool config */ + config?: (google.cloud.gkemulticloud.v1.IAwsNodeConfig|null); + + /** AwsNodePool autoscaling */ + autoscaling?: (google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling|null); + + /** AwsNodePool subnetId */ + subnetId?: (string|null); + + /** AwsNodePool state */ + state?: (google.cloud.gkemulticloud.v1.AwsNodePool.State|keyof typeof google.cloud.gkemulticloud.v1.AwsNodePool.State|null); + + /** AwsNodePool uid */ + uid?: (string|null); + + /** AwsNodePool reconciling */ + reconciling?: (boolean|null); + + /** AwsNodePool createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** AwsNodePool updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AwsNodePool etag */ + etag?: (string|null); + + /** AwsNodePool annotations */ + annotations?: ({ [k: string]: string }|null); + + /** AwsNodePool maxPodsConstraint */ + maxPodsConstraint?: (google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null); + + /** AwsNodePool errors */ + errors?: (google.cloud.gkemulticloud.v1.IAwsNodePoolError[]|null); } - /** Represents an AwsK8sVersionInfo. */ - class AwsK8sVersionInfo implements IAwsK8sVersionInfo { + /** Represents an AwsNodePool. */ + class AwsNodePool implements IAwsNodePool { /** - * Constructs a new AwsK8sVersionInfo. + * Constructs a new AwsNodePool. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsNodePool); - /** AwsK8sVersionInfo version. */ + /** AwsNodePool name. */ + public name: string; + + /** AwsNodePool version. */ public version: string; + /** AwsNodePool config. */ + public config?: (google.cloud.gkemulticloud.v1.IAwsNodeConfig|null); + + /** AwsNodePool autoscaling. */ + public autoscaling?: (google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling|null); + + /** AwsNodePool subnetId. */ + public subnetId: string; + + /** AwsNodePool state. */ + public state: (google.cloud.gkemulticloud.v1.AwsNodePool.State|keyof typeof google.cloud.gkemulticloud.v1.AwsNodePool.State); + + /** AwsNodePool uid. */ + public uid: string; + + /** AwsNodePool reconciling. */ + public reconciling: boolean; + + /** AwsNodePool createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** AwsNodePool updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AwsNodePool etag. */ + public etag: string; + + /** AwsNodePool annotations. */ + public annotations: { [k: string]: string }; + + /** AwsNodePool maxPodsConstraint. */ + public maxPodsConstraint?: (google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null); + + /** AwsNodePool errors. */ + public errors: google.cloud.gkemulticloud.v1.IAwsNodePoolError[]; + /** - * Creates a new AwsK8sVersionInfo instance using the specified properties. + * Creates a new AwsNodePool instance using the specified properties. * @param [properties] Properties to set - * @returns AwsK8sVersionInfo instance + * @returns AwsNodePool instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo): google.cloud.gkemulticloud.v1.AwsK8sVersionInfo; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsNodePool): google.cloud.gkemulticloud.v1.AwsNodePool; /** - * Encodes the specified AwsK8sVersionInfo message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify|verify} messages. - * @param message AwsK8sVersionInfo message or plain object to encode + * Encodes the specified AwsNodePool message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePool.verify|verify} messages. + * @param message AwsNodePool message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsNodePool, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsK8sVersionInfo message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify|verify} messages. - * @param message AwsK8sVersionInfo message or plain object to encode + * Encodes the specified AwsNodePool message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePool.verify|verify} messages. + * @param message AwsNodePool message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsNodePool, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsK8sVersionInfo message from the specified reader or buffer. + * Decodes an AwsNodePool message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsK8sVersionInfo + * @returns AwsNodePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsK8sVersionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsNodePool; /** - * Decodes an AwsK8sVersionInfo message from the specified reader or buffer, length delimited. + * Decodes an AwsNodePool message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsK8sVersionInfo + * @returns AwsNodePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsK8sVersionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsNodePool; /** - * Verifies an AwsK8sVersionInfo message. + * Verifies an AwsNodePool message. * @param message Plain 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 AwsK8sVersionInfo message from a plain object. Also converts values to their respective internal types. + * Creates an AwsNodePool message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsK8sVersionInfo + * @returns AwsNodePool */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsK8sVersionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsNodePool; /** - * Creates a plain object from an AwsK8sVersionInfo message. Also converts values to other types if specified. - * @param message AwsK8sVersionInfo + * Creates a plain object from an AwsNodePool message. Also converts values to other types if specified. + * @param message AwsNodePool * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsK8sVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsNodePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsK8sVersionInfo to JSON. + * Converts this AwsNodePool to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsK8sVersionInfo + * Gets the default type url for AwsNodePool * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsSshConfig. */ - interface IAwsSshConfig { + namespace AwsNodePool { - /** AwsSshConfig ec2KeyPair */ - ec2KeyPair?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PROVISIONING = 1, + RUNNING = 2, + RECONCILING = 3, + STOPPING = 4, + ERROR = 5, + DEGRADED = 6 + } } - /** Represents an AwsSshConfig. */ - class AwsSshConfig implements IAwsSshConfig { + /** Properties of an AwsNodeConfig. */ + interface IAwsNodeConfig { + + /** AwsNodeConfig instanceType */ + instanceType?: (string|null); + + /** AwsNodeConfig rootVolume */ + rootVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); + + /** AwsNodeConfig taints */ + taints?: (google.cloud.gkemulticloud.v1.INodeTaint[]|null); + + /** AwsNodeConfig labels */ + labels?: ({ [k: string]: string }|null); + + /** AwsNodeConfig tags */ + tags?: ({ [k: string]: string }|null); + + /** AwsNodeConfig iamInstanceProfile */ + iamInstanceProfile?: (string|null); + + /** AwsNodeConfig imageType */ + imageType?: (string|null); + + /** AwsNodeConfig sshConfig */ + sshConfig?: (google.cloud.gkemulticloud.v1.IAwsSshConfig|null); + + /** AwsNodeConfig securityGroupIds */ + securityGroupIds?: (string[]|null); + + /** AwsNodeConfig proxyConfig */ + proxyConfig?: (google.cloud.gkemulticloud.v1.IAwsProxyConfig|null); + + /** AwsNodeConfig configEncryption */ + configEncryption?: (google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null); + + /** AwsNodeConfig instancePlacement */ + instancePlacement?: (google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null); + + /** AwsNodeConfig autoscalingMetricsCollection */ + autoscalingMetricsCollection?: (google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection|null); + } + + /** Represents an AwsNodeConfig. */ + class AwsNodeConfig implements IAwsNodeConfig { /** - * Constructs a new AwsSshConfig. + * Constructs a new AwsNodeConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsSshConfig); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsNodeConfig); - /** AwsSshConfig ec2KeyPair. */ - public ec2KeyPair: string; + /** AwsNodeConfig instanceType. */ + public instanceType: string; + + /** AwsNodeConfig rootVolume. */ + public rootVolume?: (google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null); + + /** AwsNodeConfig taints. */ + public taints: google.cloud.gkemulticloud.v1.INodeTaint[]; + + /** AwsNodeConfig labels. */ + public labels: { [k: string]: string }; + + /** AwsNodeConfig tags. */ + public tags: { [k: string]: string }; + + /** AwsNodeConfig iamInstanceProfile. */ + public iamInstanceProfile: string; + + /** AwsNodeConfig imageType. */ + public imageType: string; + + /** AwsNodeConfig sshConfig. */ + public sshConfig?: (google.cloud.gkemulticloud.v1.IAwsSshConfig|null); + + /** AwsNodeConfig securityGroupIds. */ + public securityGroupIds: string[]; + + /** AwsNodeConfig proxyConfig. */ + public proxyConfig?: (google.cloud.gkemulticloud.v1.IAwsProxyConfig|null); + + /** AwsNodeConfig configEncryption. */ + public configEncryption?: (google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null); + + /** AwsNodeConfig instancePlacement. */ + public instancePlacement?: (google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null); + + /** AwsNodeConfig autoscalingMetricsCollection. */ + public autoscalingMetricsCollection?: (google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection|null); /** - * Creates a new AwsSshConfig instance using the specified properties. + * Creates a new AwsNodeConfig instance using the specified properties. * @param [properties] Properties to set - * @returns AwsSshConfig instance + * @returns AwsNodeConfig instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsSshConfig): google.cloud.gkemulticloud.v1.AwsSshConfig; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsNodeConfig): google.cloud.gkemulticloud.v1.AwsNodeConfig; /** - * Encodes the specified AwsSshConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsSshConfig.verify|verify} messages. - * @param message AwsSshConfig message or plain object to encode + * Encodes the specified AwsNodeConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodeConfig.verify|verify} messages. + * @param message AwsNodeConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsSshConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsSshConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsSshConfig.verify|verify} messages. - * @param message AwsSshConfig message or plain object to encode + * Encodes the specified AwsNodeConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodeConfig.verify|verify} messages. + * @param message AwsNodeConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsSshConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsNodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsSshConfig message from the specified reader or buffer. + * Decodes an AwsNodeConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsSshConfig + * @returns AwsNodeConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsSshConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsNodeConfig; /** - * Decodes an AwsSshConfig message from the specified reader or buffer, length delimited. + * Decodes an AwsNodeConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsSshConfig + * @returns AwsNodeConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsSshConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsNodeConfig; /** - * Verifies an AwsSshConfig message. + * Verifies an AwsNodeConfig message. * @param message Plain 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 AwsSshConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AwsNodeConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsSshConfig + * @returns AwsNodeConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsSshConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsNodeConfig; /** - * Creates a plain object from an AwsSshConfig message. Also converts values to other types if specified. - * @param message AwsSshConfig + * Creates a plain object from an AwsNodeConfig message. Also converts values to other types if specified. + * @param message AwsNodeConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsSshConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsNodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsSshConfig to JSON. + * Converts this AwsNodeConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsSshConfig + * Gets the default type url for AwsNodeConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsProxyConfig. */ - interface IAwsProxyConfig { + /** Properties of an AwsNodePoolAutoscaling. */ + interface IAwsNodePoolAutoscaling { - /** AwsProxyConfig secretArn */ - secretArn?: (string|null); + /** AwsNodePoolAutoscaling minNodeCount */ + minNodeCount?: (number|null); - /** AwsProxyConfig secretVersion */ - secretVersion?: (string|null); + /** AwsNodePoolAutoscaling maxNodeCount */ + maxNodeCount?: (number|null); } - /** Represents an AwsProxyConfig. */ - class AwsProxyConfig implements IAwsProxyConfig { + /** Represents an AwsNodePoolAutoscaling. */ + class AwsNodePoolAutoscaling implements IAwsNodePoolAutoscaling { /** - * Constructs a new AwsProxyConfig. + * Constructs a new AwsNodePoolAutoscaling. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsProxyConfig); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling); - /** AwsProxyConfig secretArn. */ - public secretArn: string; + /** AwsNodePoolAutoscaling minNodeCount. */ + public minNodeCount: number; - /** AwsProxyConfig secretVersion. */ - public secretVersion: string; + /** AwsNodePoolAutoscaling maxNodeCount. */ + public maxNodeCount: number; /** - * Creates a new AwsProxyConfig instance using the specified properties. + * Creates a new AwsNodePoolAutoscaling instance using the specified properties. * @param [properties] Properties to set - * @returns AwsProxyConfig instance + * @returns AwsNodePoolAutoscaling instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsProxyConfig): google.cloud.gkemulticloud.v1.AwsProxyConfig; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling): google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling; /** - * Encodes the specified AwsProxyConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsProxyConfig.verify|verify} messages. - * @param message AwsProxyConfig message or plain object to encode + * Encodes the specified AwsNodePoolAutoscaling message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify|verify} messages. + * @param message AwsNodePoolAutoscaling message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsProxyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsProxyConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsProxyConfig.verify|verify} messages. - * @param message AwsProxyConfig message or plain object to encode + * Encodes the specified AwsNodePoolAutoscaling message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify|verify} messages. + * @param message AwsNodePoolAutoscaling message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsProxyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsProxyConfig message from the specified reader or buffer. + * Decodes an AwsNodePoolAutoscaling message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsProxyConfig + * @returns AwsNodePoolAutoscaling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsProxyConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling; /** - * Decodes an AwsProxyConfig message from the specified reader or buffer, length delimited. + * Decodes an AwsNodePoolAutoscaling message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsProxyConfig + * @returns AwsNodePoolAutoscaling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsProxyConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling; /** - * Verifies an AwsProxyConfig message. + * Verifies an AwsNodePoolAutoscaling message. * @param message Plain 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 AwsProxyConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AwsNodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsProxyConfig + * @returns AwsNodePoolAutoscaling */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsProxyConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling; /** - * Creates a plain object from an AwsProxyConfig message. Also converts values to other types if specified. - * @param message AwsProxyConfig + * Creates a plain object from an AwsNodePoolAutoscaling message. Also converts values to other types if specified. + * @param message AwsNodePoolAutoscaling * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsProxyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsProxyConfig to JSON. + * Converts this AwsNodePoolAutoscaling to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsProxyConfig + * Gets the default type url for AwsNodePoolAutoscaling * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsConfigEncryption. */ - interface IAwsConfigEncryption { + /** Properties of an AwsServerConfig. */ + interface IAwsServerConfig { - /** AwsConfigEncryption kmsKeyArn */ - kmsKeyArn?: (string|null); + /** AwsServerConfig name */ + name?: (string|null); + + /** AwsServerConfig validVersions */ + validVersions?: (google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo[]|null); + + /** AwsServerConfig supportedAwsRegions */ + supportedAwsRegions?: (string[]|null); } - /** Represents an AwsConfigEncryption. */ - class AwsConfigEncryption implements IAwsConfigEncryption { + /** Represents an AwsServerConfig. */ + class AwsServerConfig implements IAwsServerConfig { /** - * Constructs a new AwsConfigEncryption. + * Constructs a new AwsServerConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsConfigEncryption); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsServerConfig); - /** AwsConfigEncryption kmsKeyArn. */ - public kmsKeyArn: string; + /** AwsServerConfig name. */ + public name: string; + + /** AwsServerConfig validVersions. */ + public validVersions: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo[]; + + /** AwsServerConfig supportedAwsRegions. */ + public supportedAwsRegions: string[]; /** - * Creates a new AwsConfigEncryption instance using the specified properties. + * Creates a new AwsServerConfig instance using the specified properties. * @param [properties] Properties to set - * @returns AwsConfigEncryption instance + * @returns AwsServerConfig instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsConfigEncryption): google.cloud.gkemulticloud.v1.AwsConfigEncryption; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsServerConfig): google.cloud.gkemulticloud.v1.AwsServerConfig; /** - * Encodes the specified AwsConfigEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify|verify} messages. - * @param message AwsConfigEncryption message or plain object to encode + * Encodes the specified AwsServerConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServerConfig.verify|verify} messages. + * @param message AwsServerConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsConfigEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsConfigEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify|verify} messages. - * @param message AwsConfigEncryption message or plain object to encode + * Encodes the specified AwsServerConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServerConfig.verify|verify} messages. + * @param message AwsServerConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsConfigEncryption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsConfigEncryption message from the specified reader or buffer. + * Decodes an AwsServerConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsConfigEncryption + * @returns AwsServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsConfigEncryption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsServerConfig; /** - * Decodes an AwsConfigEncryption message from the specified reader or buffer, length delimited. + * Decodes an AwsServerConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsConfigEncryption + * @returns AwsServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsConfigEncryption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsServerConfig; /** - * Verifies an AwsConfigEncryption message. + * Verifies an AwsServerConfig message. * @param message Plain 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 AwsConfigEncryption message from a plain object. Also converts values to their respective internal types. + * Creates an AwsServerConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsConfigEncryption + * @returns AwsServerConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsConfigEncryption; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsServerConfig; /** - * Creates a plain object from an AwsConfigEncryption message. Also converts values to other types if specified. - * @param message AwsConfigEncryption + * Creates a plain object from an AwsServerConfig message. Also converts values to other types if specified. + * @param message AwsServerConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsConfigEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsConfigEncryption to JSON. + * Converts this AwsServerConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsConfigEncryption + * Gets the default type url for AwsServerConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AwsInstancePlacement. */ - interface IAwsInstancePlacement { + /** Properties of an AwsK8sVersionInfo. */ + interface IAwsK8sVersionInfo { - /** AwsInstancePlacement tenancy */ - tenancy?: (google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy|keyof typeof google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy|null); + /** AwsK8sVersionInfo version */ + version?: (string|null); } - /** Represents an AwsInstancePlacement. */ - class AwsInstancePlacement implements IAwsInstancePlacement { + /** Represents an AwsK8sVersionInfo. */ + class AwsK8sVersionInfo implements IAwsK8sVersionInfo { /** - * Constructs a new AwsInstancePlacement. + * Constructs a new AwsK8sVersionInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IAwsInstancePlacement); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo); - /** AwsInstancePlacement tenancy. */ - public tenancy: (google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy|keyof typeof google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy); + /** AwsK8sVersionInfo version. */ + public version: string; /** - * Creates a new AwsInstancePlacement instance using the specified properties. + * Creates a new AwsK8sVersionInfo instance using the specified properties. * @param [properties] Properties to set - * @returns AwsInstancePlacement instance + * @returns AwsK8sVersionInfo instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IAwsInstancePlacement): google.cloud.gkemulticloud.v1.AwsInstancePlacement; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo): google.cloud.gkemulticloud.v1.AwsK8sVersionInfo; /** - * Encodes the specified AwsInstancePlacement message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify|verify} messages. - * @param message AwsInstancePlacement message or plain object to encode + * Encodes the specified AwsK8sVersionInfo message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify|verify} messages. + * @param message AwsK8sVersionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IAwsInstancePlacement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AwsInstancePlacement message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify|verify} messages. - * @param message AwsInstancePlacement message or plain object to encode + * Encodes the specified AwsK8sVersionInfo message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify|verify} messages. + * @param message AwsK8sVersionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsInstancePlacement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AwsInstancePlacement message from the specified reader or buffer. + * Decodes an AwsK8sVersionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AwsInstancePlacement + * @returns AwsK8sVersionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsInstancePlacement; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsK8sVersionInfo; /** - * Decodes an AwsInstancePlacement message from the specified reader or buffer, length delimited. + * Decodes an AwsK8sVersionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AwsInstancePlacement + * @returns AwsK8sVersionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsInstancePlacement; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsK8sVersionInfo; /** - * Verifies an AwsInstancePlacement message. + * Verifies an AwsK8sVersionInfo message. * @param message Plain 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 AwsInstancePlacement message from a plain object. Also converts values to their respective internal types. + * Creates an AwsK8sVersionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AwsInstancePlacement + * @returns AwsK8sVersionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsInstancePlacement; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsK8sVersionInfo; /** - * Creates a plain object from an AwsInstancePlacement message. Also converts values to other types if specified. - * @param message AwsInstancePlacement + * Creates a plain object from an AwsK8sVersionInfo message. Also converts values to other types if specified. + * @param message AwsK8sVersionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.AwsInstancePlacement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsK8sVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AwsInstancePlacement to JSON. + * Converts this AwsK8sVersionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AwsInstancePlacement + * Gets the default type url for AwsK8sVersionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AwsInstancePlacement { - - /** Tenancy enum. */ - enum Tenancy { - TENANCY_UNSPECIFIED = 0, - DEFAULT = 1, - DEDICATED = 2, - HOST = 3 - } - } - - /** Properties of a WorkloadIdentityConfig. */ - interface IWorkloadIdentityConfig { - - /** WorkloadIdentityConfig issuerUri */ - issuerUri?: (string|null); - - /** WorkloadIdentityConfig workloadPool */ - workloadPool?: (string|null); + /** Properties of an AwsSshConfig. */ + interface IAwsSshConfig { - /** WorkloadIdentityConfig identityProvider */ - identityProvider?: (string|null); + /** AwsSshConfig ec2KeyPair */ + ec2KeyPair?: (string|null); } - /** Represents a WorkloadIdentityConfig. */ - class WorkloadIdentityConfig implements IWorkloadIdentityConfig { + /** Represents an AwsSshConfig. */ + class AwsSshConfig implements IAwsSshConfig { /** - * Constructs a new WorkloadIdentityConfig. + * Constructs a new AwsSshConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig); - - /** WorkloadIdentityConfig issuerUri. */ - public issuerUri: string; - - /** WorkloadIdentityConfig workloadPool. */ - public workloadPool: string; + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsSshConfig); - /** WorkloadIdentityConfig identityProvider. */ - public identityProvider: string; + /** AwsSshConfig ec2KeyPair. */ + public ec2KeyPair: string; /** - * Creates a new WorkloadIdentityConfig instance using the specified properties. + * Creates a new AwsSshConfig instance using the specified properties. * @param [properties] Properties to set - * @returns WorkloadIdentityConfig instance + * @returns AwsSshConfig instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig): google.cloud.gkemulticloud.v1.WorkloadIdentityConfig; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsSshConfig): google.cloud.gkemulticloud.v1.AwsSshConfig; /** - * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify|verify} messages. - * @param message WorkloadIdentityConfig message or plain object to encode + * Encodes the specified AwsSshConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsSshConfig.verify|verify} messages. + * @param message AwsSshConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsSshConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify|verify} messages. - * @param message WorkloadIdentityConfig message or plain object to encode + * Encodes the specified AwsSshConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsSshConfig.verify|verify} messages. + * @param message AwsSshConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsSshConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer. + * Decodes an AwsSshConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WorkloadIdentityConfig + * @returns AwsSshConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.WorkloadIdentityConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsSshConfig; /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. + * Decodes an AwsSshConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WorkloadIdentityConfig + * @returns AwsSshConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.WorkloadIdentityConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsSshConfig; /** - * Verifies a WorkloadIdentityConfig message. + * Verifies an AwsSshConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AwsSshConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WorkloadIdentityConfig + * @returns AwsSshConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.WorkloadIdentityConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsSshConfig; /** - * Creates a plain object from a WorkloadIdentityConfig message. Also converts values to other types if specified. - * @param message WorkloadIdentityConfig + * Creates a plain object from an AwsSshConfig message. Also converts values to other types if specified. + * @param message AwsSshConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.WorkloadIdentityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsSshConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WorkloadIdentityConfig to JSON. + * Converts this AwsSshConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for WorkloadIdentityConfig + * Gets the default type url for AwsSshConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MaxPodsConstraint. */ - interface IMaxPodsConstraint { + /** Properties of an AwsProxyConfig. */ + interface IAwsProxyConfig { - /** MaxPodsConstraint maxPodsPerNode */ - maxPodsPerNode?: (number|Long|string|null); + /** AwsProxyConfig secretArn */ + secretArn?: (string|null); + + /** AwsProxyConfig secretVersion */ + secretVersion?: (string|null); } - /** Represents a MaxPodsConstraint. */ - class MaxPodsConstraint implements IMaxPodsConstraint { + /** Represents an AwsProxyConfig. */ + class AwsProxyConfig implements IAwsProxyConfig { /** - * Constructs a new MaxPodsConstraint. + * Constructs a new AwsProxyConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IMaxPodsConstraint); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsProxyConfig); - /** MaxPodsConstraint maxPodsPerNode. */ - public maxPodsPerNode: (number|Long|string); + /** AwsProxyConfig secretArn. */ + public secretArn: string; + + /** AwsProxyConfig secretVersion. */ + public secretVersion: string; /** - * Creates a new MaxPodsConstraint instance using the specified properties. + * Creates a new AwsProxyConfig instance using the specified properties. * @param [properties] Properties to set - * @returns MaxPodsConstraint instance + * @returns AwsProxyConfig instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IMaxPodsConstraint): google.cloud.gkemulticloud.v1.MaxPodsConstraint; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsProxyConfig): google.cloud.gkemulticloud.v1.AwsProxyConfig; /** - * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify|verify} messages. - * @param message MaxPodsConstraint message or plain object to encode + * Encodes the specified AwsProxyConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsProxyConfig.verify|verify} messages. + * @param message AwsProxyConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsProxyConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify|verify} messages. - * @param message MaxPodsConstraint message or plain object to encode + * Encodes the specified AwsProxyConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsProxyConfig.verify|verify} messages. + * @param message AwsProxyConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IMaxPodsConstraint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsProxyConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MaxPodsConstraint message from the specified reader or buffer. + * Decodes an AwsProxyConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MaxPodsConstraint + * @returns AwsProxyConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.MaxPodsConstraint; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsProxyConfig; /** - * Decodes a MaxPodsConstraint message from the specified reader or buffer, length delimited. + * Decodes an AwsProxyConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MaxPodsConstraint + * @returns AwsProxyConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.MaxPodsConstraint; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsProxyConfig; /** - * Verifies a MaxPodsConstraint message. + * Verifies an AwsProxyConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MaxPodsConstraint message from a plain object. Also converts values to their respective internal types. + * Creates an AwsProxyConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MaxPodsConstraint + * @returns AwsProxyConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.MaxPodsConstraint; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsProxyConfig; /** - * Creates a plain object from a MaxPodsConstraint message. Also converts values to other types if specified. - * @param message MaxPodsConstraint + * Creates a plain object from an AwsProxyConfig message. Also converts values to other types if specified. + * @param message AwsProxyConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.MaxPodsConstraint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsProxyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MaxPodsConstraint to JSON. + * Converts this AwsProxyConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MaxPodsConstraint + * Gets the default type url for AwsProxyConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target */ - target?: (string|null); - - /** OperationMetadata statusDetail */ - statusDetail?: (string|null); + /** Properties of an AwsConfigEncryption. */ + interface IAwsConfigEncryption { - /** OperationMetadata errorDetail */ - errorDetail?: (string|null); + /** AwsConfigEncryption kmsKeyArn */ + kmsKeyArn?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents an AwsConfigEncryption. */ + class AwsConfigEncryption implements IAwsConfigEncryption { /** - * Constructs a new OperationMetadata. + * Constructs a new AwsConfigEncryption. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; - - /** OperationMetadata statusDetail. */ - public statusDetail: string; + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsConfigEncryption); - /** OperationMetadata errorDetail. */ - public errorDetail: string; + /** AwsConfigEncryption kmsKeyArn. */ + public kmsKeyArn: string; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new AwsConfigEncryption instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns AwsConfigEncryption instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IOperationMetadata): google.cloud.gkemulticloud.v1.OperationMetadata; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsConfigEncryption): google.cloud.gkemulticloud.v1.AwsConfigEncryption; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.gkemulticloud.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified AwsConfigEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify|verify} messages. + * @param message AwsConfigEncryption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsConfigEncryption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified AwsConfigEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify|verify} messages. + * @param message AwsConfigEncryption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsConfigEncryption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes an AwsConfigEncryption message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns AwsConfigEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsConfigEncryption; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an AwsConfigEncryption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns AwsConfigEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsConfigEncryption; /** - * Verifies an OperationMetadata message. + * Verifies an AwsConfigEncryption message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an AwsConfigEncryption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns AwsConfigEncryption */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsConfigEncryption; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from an AwsConfigEncryption message. Also converts values to other types if specified. + * @param message AwsConfigEncryption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsConfigEncryption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this AwsConfigEncryption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for AwsConfigEncryption * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NodeTaint. */ - interface INodeTaint { - - /** NodeTaint key */ - key?: (string|null); - - /** NodeTaint value */ - value?: (string|null); + /** Properties of an AwsInstancePlacement. */ + interface IAwsInstancePlacement { - /** NodeTaint effect */ - effect?: (google.cloud.gkemulticloud.v1.NodeTaint.Effect|keyof typeof google.cloud.gkemulticloud.v1.NodeTaint.Effect|null); + /** AwsInstancePlacement tenancy */ + tenancy?: (google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy|keyof typeof google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy|null); } - /** Represents a NodeTaint. */ - class NodeTaint implements INodeTaint { + /** Represents an AwsInstancePlacement. */ + class AwsInstancePlacement implements IAwsInstancePlacement { /** - * Constructs a new NodeTaint. + * Constructs a new AwsInstancePlacement. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.INodeTaint); - - /** NodeTaint key. */ - public key: string; - - /** NodeTaint value. */ - public value: string; + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsInstancePlacement); - /** NodeTaint effect. */ - public effect: (google.cloud.gkemulticloud.v1.NodeTaint.Effect|keyof typeof google.cloud.gkemulticloud.v1.NodeTaint.Effect); + /** AwsInstancePlacement tenancy. */ + public tenancy: (google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy|keyof typeof google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy); /** - * Creates a new NodeTaint instance using the specified properties. + * Creates a new AwsInstancePlacement instance using the specified properties. * @param [properties] Properties to set - * @returns NodeTaint instance + * @returns AwsInstancePlacement instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.INodeTaint): google.cloud.gkemulticloud.v1.NodeTaint; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsInstancePlacement): google.cloud.gkemulticloud.v1.AwsInstancePlacement; /** - * Encodes the specified NodeTaint message. Does not implicitly {@link google.cloud.gkemulticloud.v1.NodeTaint.verify|verify} messages. - * @param message NodeTaint message or plain object to encode + * Encodes the specified AwsInstancePlacement message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify|verify} messages. + * @param message AwsInstancePlacement message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.INodeTaint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsInstancePlacement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.NodeTaint.verify|verify} messages. - * @param message NodeTaint message or plain object to encode + * Encodes the specified AwsInstancePlacement message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify|verify} messages. + * @param message AwsInstancePlacement message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.INodeTaint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsInstancePlacement, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NodeTaint message from the specified reader or buffer. + * Decodes an AwsInstancePlacement message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NodeTaint + * @returns AwsInstancePlacement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.NodeTaint; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsInstancePlacement; /** - * Decodes a NodeTaint message from the specified reader or buffer, length delimited. + * Decodes an AwsInstancePlacement message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NodeTaint + * @returns AwsInstancePlacement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.NodeTaint; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsInstancePlacement; /** - * Verifies a NodeTaint message. + * Verifies an AwsInstancePlacement message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NodeTaint message from a plain object. Also converts values to their respective internal types. + * Creates an AwsInstancePlacement message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NodeTaint + * @returns AwsInstancePlacement */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.NodeTaint; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsInstancePlacement; /** - * Creates a plain object from a NodeTaint message. Also converts values to other types if specified. - * @param message NodeTaint + * Creates a plain object from an AwsInstancePlacement message. Also converts values to other types if specified. + * @param message AwsInstancePlacement * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.NodeTaint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsInstancePlacement, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NodeTaint to JSON. + * Converts this AwsInstancePlacement to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NodeTaint + * Gets the default type url for AwsInstancePlacement * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NodeTaint { - - /** Effect enum. */ - enum Effect { - EFFECT_UNSPECIFIED = 0, - NO_SCHEDULE = 1, - PREFER_NO_SCHEDULE = 2, - NO_EXECUTE = 3 + namespace AwsInstancePlacement { + + /** Tenancy enum. */ + enum Tenancy { + TENANCY_UNSPECIFIED = 0, + DEFAULT = 1, + DEDICATED = 2, + HOST = 3 } } - /** Properties of a Fleet. */ - interface IFleet { + /** Properties of an AwsAutoscalingGroupMetricsCollection. */ + interface IAwsAutoscalingGroupMetricsCollection { - /** Fleet project */ - project?: (string|null); + /** AwsAutoscalingGroupMetricsCollection granularity */ + granularity?: (string|null); - /** Fleet membership */ - membership?: (string|null); + /** AwsAutoscalingGroupMetricsCollection metrics */ + metrics?: (string[]|null); } - /** Represents a Fleet. */ - class Fleet implements IFleet { + /** Represents an AwsAutoscalingGroupMetricsCollection. */ + class AwsAutoscalingGroupMetricsCollection implements IAwsAutoscalingGroupMetricsCollection { /** - * Constructs a new Fleet. + * Constructs a new AwsAutoscalingGroupMetricsCollection. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.IFleet); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection); - /** Fleet project. */ - public project: string; + /** AwsAutoscalingGroupMetricsCollection granularity. */ + public granularity: string; - /** Fleet membership. */ - public membership: string; + /** AwsAutoscalingGroupMetricsCollection metrics. */ + public metrics: string[]; /** - * Creates a new Fleet instance using the specified properties. + * Creates a new AwsAutoscalingGroupMetricsCollection instance using the specified properties. * @param [properties] Properties to set - * @returns Fleet instance + * @returns AwsAutoscalingGroupMetricsCollection instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.IFleet): google.cloud.gkemulticloud.v1.Fleet; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection): google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection; /** - * Encodes the specified Fleet message. Does not implicitly {@link google.cloud.gkemulticloud.v1.Fleet.verify|verify} messages. - * @param message Fleet message or plain object to encode + * Encodes the specified AwsAutoscalingGroupMetricsCollection message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.verify|verify} messages. + * @param message AwsAutoscalingGroupMetricsCollection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.Fleet.verify|verify} messages. - * @param message Fleet message or plain object to encode + * Encodes the specified AwsAutoscalingGroupMetricsCollection message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.verify|verify} messages. + * @param message AwsAutoscalingGroupMetricsCollection message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Fleet message from the specified reader or buffer. + * Decodes an AwsAutoscalingGroupMetricsCollection message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Fleet + * @returns AwsAutoscalingGroupMetricsCollection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.Fleet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection; /** - * Decodes a Fleet message from the specified reader or buffer, length delimited. + * Decodes an AwsAutoscalingGroupMetricsCollection message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Fleet + * @returns AwsAutoscalingGroupMetricsCollection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.Fleet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection; /** - * Verifies a Fleet message. + * Verifies an AwsAutoscalingGroupMetricsCollection message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Fleet message from a plain object. Also converts values to their respective internal types. + * Creates an AwsAutoscalingGroupMetricsCollection message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Fleet + * @returns AwsAutoscalingGroupMetricsCollection */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.Fleet; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection; /** - * Creates a plain object from a Fleet message. Also converts values to other types if specified. - * @param message Fleet + * Creates a plain object from an AwsAutoscalingGroupMetricsCollection message. Also converts values to other types if specified. + * @param message AwsAutoscalingGroupMetricsCollection * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.Fleet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Fleet to JSON. + * Converts this AwsAutoscalingGroupMetricsCollection to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Fleet + * Gets the default type url for AwsAutoscalingGroupMetricsCollection * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LoggingConfig. */ - interface ILoggingConfig { + /** Properties of an AwsClusterError. */ + interface IAwsClusterError { - /** LoggingConfig componentConfig */ - componentConfig?: (google.cloud.gkemulticloud.v1.ILoggingComponentConfig|null); + /** AwsClusterError message */ + message?: (string|null); } - /** Represents a LoggingConfig. */ - class LoggingConfig implements ILoggingConfig { + /** Represents an AwsClusterError. */ + class AwsClusterError implements IAwsClusterError { /** - * Constructs a new LoggingConfig. + * Constructs a new AwsClusterError. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.ILoggingConfig); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsClusterError); - /** LoggingConfig componentConfig. */ - public componentConfig?: (google.cloud.gkemulticloud.v1.ILoggingComponentConfig|null); + /** AwsClusterError message. */ + public message: string; /** - * Creates a new LoggingConfig instance using the specified properties. + * Creates a new AwsClusterError instance using the specified properties. * @param [properties] Properties to set - * @returns LoggingConfig instance + * @returns AwsClusterError instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.ILoggingConfig): google.cloud.gkemulticloud.v1.LoggingConfig; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsClusterError): google.cloud.gkemulticloud.v1.AwsClusterError; /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingConfig.verify|verify} messages. - * @param message LoggingConfig message or plain object to encode + * Encodes the specified AwsClusterError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterError.verify|verify} messages. + * @param message AwsClusterError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsClusterError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingConfig.verify|verify} messages. - * @param message LoggingConfig message or plain object to encode + * Encodes the specified AwsClusterError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterError.verify|verify} messages. + * @param message AwsClusterError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsClusterError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LoggingConfig message from the specified reader or buffer. + * Decodes an AwsClusterError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LoggingConfig + * @returns AwsClusterError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.LoggingConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsClusterError; /** - * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * Decodes an AwsClusterError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LoggingConfig + * @returns AwsClusterError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.LoggingConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsClusterError; /** - * Verifies a LoggingConfig message. + * Verifies an AwsClusterError message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AwsClusterError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LoggingConfig + * @returns AwsClusterError */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.LoggingConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsClusterError; /** - * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. - * @param message LoggingConfig + * Creates a plain object from an AwsClusterError message. Also converts values to other types if specified. + * @param message AwsClusterError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.LoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsClusterError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LoggingConfig to JSON. + * Converts this AwsClusterError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LoggingConfig + * Gets the default type url for AwsClusterError * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LoggingComponentConfig. */ - interface ILoggingComponentConfig { + /** Properties of an AwsNodePoolError. */ + interface IAwsNodePoolError { - /** LoggingComponentConfig enableComponents */ - enableComponents?: (google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component[]|null); + /** AwsNodePoolError message */ + message?: (string|null); } - /** Represents a LoggingComponentConfig. */ - class LoggingComponentConfig implements ILoggingComponentConfig { + /** Represents an AwsNodePoolError. */ + class AwsNodePoolError implements IAwsNodePoolError { /** - * Constructs a new LoggingComponentConfig. + * Constructs a new AwsNodePoolError. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkemulticloud.v1.ILoggingComponentConfig); + constructor(properties?: google.cloud.gkemulticloud.v1.IAwsNodePoolError); - /** LoggingComponentConfig enableComponents. */ - public enableComponents: google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component[]; + /** AwsNodePoolError message. */ + public message: string; /** - * Creates a new LoggingComponentConfig instance using the specified properties. + * Creates a new AwsNodePoolError instance using the specified properties. * @param [properties] Properties to set - * @returns LoggingComponentConfig instance + * @returns AwsNodePoolError instance */ - public static create(properties?: google.cloud.gkemulticloud.v1.ILoggingComponentConfig): google.cloud.gkemulticloud.v1.LoggingComponentConfig; + public static create(properties?: google.cloud.gkemulticloud.v1.IAwsNodePoolError): google.cloud.gkemulticloud.v1.AwsNodePoolError; /** - * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify|verify} messages. - * @param message LoggingComponentConfig message or plain object to encode + * Encodes the specified AwsNodePoolError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolError.verify|verify} messages. + * @param message AwsNodePoolError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkemulticloud.v1.ILoggingComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkemulticloud.v1.IAwsNodePoolError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify|verify} messages. - * @param message LoggingComponentConfig message or plain object to encode + * Encodes the specified AwsNodePoolError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolError.verify|verify} messages. + * @param message AwsNodePoolError message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkemulticloud.v1.ILoggingComponentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAwsNodePoolError, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LoggingComponentConfig message from the specified reader or buffer. + * Decodes an AwsNodePoolError message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LoggingComponentConfig + * @returns AwsNodePoolError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.LoggingComponentConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AwsNodePoolError; /** - * Decodes a LoggingComponentConfig message from the specified reader or buffer, length delimited. + * Decodes an AwsNodePoolError message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LoggingComponentConfig + * @returns AwsNodePoolError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.LoggingComponentConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AwsNodePoolError; /** - * Verifies a LoggingComponentConfig message. + * Verifies an AwsNodePoolError message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LoggingComponentConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AwsNodePoolError message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LoggingComponentConfig + * @returns AwsNodePoolError */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.LoggingComponentConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AwsNodePoolError; /** - * Creates a plain object from a LoggingComponentConfig message. Also converts values to other types if specified. - * @param message LoggingComponentConfig + * Creates a plain object from an AwsNodePoolError message. Also converts values to other types if specified. + * @param message AwsNodePoolError * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkemulticloud.v1.LoggingComponentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkemulticloud.v1.AwsNodePoolError, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LoggingComponentConfig to JSON. + * Converts this AwsNodePoolError to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LoggingComponentConfig + * Gets the default type url for AwsNodePoolError * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace LoggingComponentConfig { - - /** Component enum. */ - enum Component { - COMPONENT_UNSPECIFIED = 0, - SYSTEM_COMPONENTS = 1, - WORKLOADS = 2 - } - } - /** Represents an AwsClusters */ class AwsClusters extends $protobuf.rpc.Service { @@ -4790,6 +7406,12 @@ export namespace google { /** AzureCluster loggingConfig */ loggingConfig?: (google.cloud.gkemulticloud.v1.ILoggingConfig|null); + + /** AzureCluster errors */ + errors?: (google.cloud.gkemulticloud.v1.IAzureClusterError[]|null); + + /** AzureCluster monitoringConfig */ + monitoringConfig?: (google.cloud.gkemulticloud.v1.IMonitoringConfig|null); } /** Represents an AzureCluster. */ @@ -4864,6 +7486,12 @@ export namespace google { /** AzureCluster loggingConfig. */ public loggingConfig?: (google.cloud.gkemulticloud.v1.ILoggingConfig|null); + /** AzureCluster errors. */ + public errors: google.cloud.gkemulticloud.v1.IAzureClusterError[]; + + /** AzureCluster monitoringConfig. */ + public monitoringConfig?: (google.cloud.gkemulticloud.v1.IMonitoringConfig|null); + /** * Creates a new AzureCluster instance using the specified properties. * @param [properties] Properties to set @@ -6108,6 +8736,9 @@ export namespace google { /** AzureNodePool azureAvailabilityZone */ azureAvailabilityZone?: (string|null); + + /** AzureNodePool errors */ + errors?: (google.cloud.gkemulticloud.v1.IAzureNodePoolError[]|null); } /** Represents an AzureNodePool. */ @@ -6161,6 +8792,9 @@ export namespace google { /** AzureNodePool azureAvailabilityZone. */ public azureAvailabilityZone: string; + /** AzureNodePool errors. */ + public errors: google.cloud.gkemulticloud.v1.IAzureNodePoolError[]; + /** * Creates a new AzureNodePool instance using the specified properties. * @param [properties] Properties to set @@ -6907,6 +9541,200 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AzureClusterError. */ + interface IAzureClusterError { + + /** AzureClusterError message */ + message?: (string|null); + } + + /** Represents an AzureClusterError. */ + class AzureClusterError implements IAzureClusterError { + + /** + * Constructs a new AzureClusterError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IAzureClusterError); + + /** AzureClusterError message. */ + public message: string; + + /** + * Creates a new AzureClusterError instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureClusterError instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IAzureClusterError): google.cloud.gkemulticloud.v1.AzureClusterError; + + /** + * Encodes the specified AzureClusterError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterError.verify|verify} messages. + * @param message AzureClusterError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IAzureClusterError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureClusterError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterError.verify|verify} messages. + * @param message AzureClusterError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAzureClusterError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureClusterError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureClusterError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AzureClusterError; + + /** + * Decodes an AzureClusterError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureClusterError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AzureClusterError; + + /** + * Verifies an AzureClusterError message. + * @param message Plain 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 AzureClusterError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureClusterError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AzureClusterError; + + /** + * Creates a plain object from an AzureClusterError message. Also converts values to other types if specified. + * @param message AzureClusterError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.AzureClusterError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureClusterError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureClusterError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AzureNodePoolError. */ + interface IAzureNodePoolError { + + /** AzureNodePoolError message */ + message?: (string|null); + } + + /** Represents an AzureNodePoolError. */ + class AzureNodePoolError implements IAzureNodePoolError { + + /** + * Constructs a new AzureNodePoolError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkemulticloud.v1.IAzureNodePoolError); + + /** AzureNodePoolError message. */ + public message: string; + + /** + * Creates a new AzureNodePoolError instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureNodePoolError instance + */ + public static create(properties?: google.cloud.gkemulticloud.v1.IAzureNodePoolError): google.cloud.gkemulticloud.v1.AzureNodePoolError; + + /** + * Encodes the specified AzureNodePoolError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePoolError.verify|verify} messages. + * @param message AzureNodePoolError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkemulticloud.v1.IAzureNodePoolError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureNodePoolError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePoolError.verify|verify} messages. + * @param message AzureNodePoolError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkemulticloud.v1.IAzureNodePoolError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureNodePoolError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureNodePoolError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkemulticloud.v1.AzureNodePoolError; + + /** + * Decodes an AzureNodePoolError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureNodePoolError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkemulticloud.v1.AzureNodePoolError; + + /** + * Verifies an AzureNodePoolError message. + * @param message Plain 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 AzureNodePoolError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureNodePoolError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkemulticloud.v1.AzureNodePoolError; + + /** + * Creates a plain object from an AzureNodePoolError message. Also converts values to other types if specified. + * @param message AzureNodePoolError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkemulticloud.v1.AzureNodePoolError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureNodePoolError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureNodePoolError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents an AzureClusters */ class AzureClusters extends $protobuf.rpc.Service { diff --git a/packages/google-cloud-gkemulticloud/protos/protos.js b/packages/google-cloud-gkemulticloud/protos/protos.js index a906d20ed35..1f538e823b7 100644 --- a/packages/google-cloud-gkemulticloud/protos/protos.js +++ b/packages/google-cloud-gkemulticloud/protos/protos.js @@ -66,42 +66,45 @@ */ var v1 = {}; - v1.AwsCluster = (function() { + v1.AttachedCluster = (function() { /** - * Properties of an AwsCluster. + * Properties of an AttachedCluster. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsCluster - * @property {string|null} [name] AwsCluster name - * @property {string|null} [description] AwsCluster description - * @property {google.cloud.gkemulticloud.v1.IAwsClusterNetworking|null} [networking] AwsCluster networking - * @property {string|null} [awsRegion] AwsCluster awsRegion - * @property {google.cloud.gkemulticloud.v1.IAwsControlPlane|null} [controlPlane] AwsCluster controlPlane - * @property {google.cloud.gkemulticloud.v1.IAwsAuthorization|null} [authorization] AwsCluster authorization - * @property {google.cloud.gkemulticloud.v1.AwsCluster.State|null} [state] AwsCluster state - * @property {string|null} [endpoint] AwsCluster endpoint - * @property {string|null} [uid] AwsCluster uid - * @property {boolean|null} [reconciling] AwsCluster reconciling - * @property {google.protobuf.ITimestamp|null} [createTime] AwsCluster createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] AwsCluster updateTime - * @property {string|null} [etag] AwsCluster etag - * @property {Object.|null} [annotations] AwsCluster annotations - * @property {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] AwsCluster workloadIdentityConfig - * @property {string|null} [clusterCaCertificate] AwsCluster clusterCaCertificate - * @property {google.cloud.gkemulticloud.v1.IFleet|null} [fleet] AwsCluster fleet - * @property {google.cloud.gkemulticloud.v1.ILoggingConfig|null} [loggingConfig] AwsCluster loggingConfig - */ - - /** - * Constructs a new AwsCluster. + * @interface IAttachedCluster + * @property {string|null} [name] AttachedCluster name + * @property {string|null} [description] AttachedCluster description + * @property {google.cloud.gkemulticloud.v1.IAttachedOidcConfig|null} [oidcConfig] AttachedCluster oidcConfig + * @property {string|null} [platformVersion] AttachedCluster platformVersion + * @property {string|null} [distribution] AttachedCluster distribution + * @property {string|null} [clusterRegion] AttachedCluster clusterRegion + * @property {google.cloud.gkemulticloud.v1.IFleet|null} [fleet] AttachedCluster fleet + * @property {google.cloud.gkemulticloud.v1.AttachedCluster.State|null} [state] AttachedCluster state + * @property {string|null} [uid] AttachedCluster uid + * @property {boolean|null} [reconciling] AttachedCluster reconciling + * @property {google.protobuf.ITimestamp|null} [createTime] AttachedCluster createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AttachedCluster updateTime + * @property {string|null} [etag] AttachedCluster etag + * @property {string|null} [kubernetesVersion] AttachedCluster kubernetesVersion + * @property {Object.|null} [annotations] AttachedCluster annotations + * @property {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] AttachedCluster workloadIdentityConfig + * @property {google.cloud.gkemulticloud.v1.ILoggingConfig|null} [loggingConfig] AttachedCluster loggingConfig + * @property {Array.|null} [errors] AttachedCluster errors + * @property {google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization|null} [authorization] AttachedCluster authorization + * @property {google.cloud.gkemulticloud.v1.IMonitoringConfig|null} [monitoringConfig] AttachedCluster monitoringConfig + */ + + /** + * Constructs a new AttachedCluster. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsCluster. - * @implements IAwsCluster + * @classdesc Represents an AttachedCluster. + * @implements IAttachedCluster * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsCluster=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAttachedCluster=} [properties] Properties to set */ - function AwsCluster(properties) { + function AttachedCluster(properties) { this.annotations = {}; + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -109,241 +112,262 @@ } /** - * AwsCluster name. + * AttachedCluster name. * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.name = ""; + AttachedCluster.prototype.name = ""; /** - * AwsCluster description. + * AttachedCluster description. * @member {string} description - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.description = ""; + AttachedCluster.prototype.description = ""; /** - * AwsCluster networking. - * @member {google.cloud.gkemulticloud.v1.IAwsClusterNetworking|null|undefined} networking - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster oidcConfig. + * @member {google.cloud.gkemulticloud.v1.IAttachedOidcConfig|null|undefined} oidcConfig + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.networking = null; + AttachedCluster.prototype.oidcConfig = null; /** - * AwsCluster awsRegion. - * @member {string} awsRegion - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster platformVersion. + * @member {string} platformVersion + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.awsRegion = ""; + AttachedCluster.prototype.platformVersion = ""; /** - * AwsCluster controlPlane. - * @member {google.cloud.gkemulticloud.v1.IAwsControlPlane|null|undefined} controlPlane - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster distribution. + * @member {string} distribution + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.controlPlane = null; + AttachedCluster.prototype.distribution = ""; /** - * AwsCluster authorization. - * @member {google.cloud.gkemulticloud.v1.IAwsAuthorization|null|undefined} authorization - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster clusterRegion. + * @member {string} clusterRegion + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.authorization = null; + AttachedCluster.prototype.clusterRegion = ""; /** - * AwsCluster state. - * @member {google.cloud.gkemulticloud.v1.AwsCluster.State} state - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster fleet. + * @member {google.cloud.gkemulticloud.v1.IFleet|null|undefined} fleet + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.state = 0; + AttachedCluster.prototype.fleet = null; /** - * AwsCluster endpoint. - * @member {string} endpoint - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster state. + * @member {google.cloud.gkemulticloud.v1.AttachedCluster.State} state + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.endpoint = ""; + AttachedCluster.prototype.state = 0; /** - * AwsCluster uid. + * AttachedCluster uid. * @member {string} uid - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.uid = ""; + AttachedCluster.prototype.uid = ""; /** - * AwsCluster reconciling. + * AttachedCluster reconciling. * @member {boolean} reconciling - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.reconciling = false; + AttachedCluster.prototype.reconciling = false; /** - * AwsCluster createTime. + * AttachedCluster createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.createTime = null; + AttachedCluster.prototype.createTime = null; /** - * AwsCluster updateTime. + * AttachedCluster updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.updateTime = null; + AttachedCluster.prototype.updateTime = null; /** - * AwsCluster etag. + * AttachedCluster etag. * @member {string} etag - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.etag = ""; + AttachedCluster.prototype.etag = ""; /** - * AwsCluster annotations. + * AttachedCluster kubernetesVersion. + * @member {string} kubernetesVersion + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster + * @instance + */ + AttachedCluster.prototype.kubernetesVersion = ""; + + /** + * AttachedCluster annotations. * @member {Object.} annotations - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.annotations = $util.emptyObject; + AttachedCluster.prototype.annotations = $util.emptyObject; /** - * AwsCluster workloadIdentityConfig. + * AttachedCluster workloadIdentityConfig. * @member {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null|undefined} workloadIdentityConfig - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.workloadIdentityConfig = null; + AttachedCluster.prototype.workloadIdentityConfig = null; /** - * AwsCluster clusterCaCertificate. - * @member {string} clusterCaCertificate - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster loggingConfig. + * @member {google.cloud.gkemulticloud.v1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.clusterCaCertificate = ""; + AttachedCluster.prototype.loggingConfig = null; /** - * AwsCluster fleet. - * @member {google.cloud.gkemulticloud.v1.IFleet|null|undefined} fleet - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster errors. + * @member {Array.} errors + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.fleet = null; + AttachedCluster.prototype.errors = $util.emptyArray; /** - * AwsCluster loggingConfig. - * @member {google.cloud.gkemulticloud.v1.ILoggingConfig|null|undefined} loggingConfig - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * AttachedCluster authorization. + * @member {google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization|null|undefined} authorization + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance */ - AwsCluster.prototype.loggingConfig = null; + AttachedCluster.prototype.authorization = null; /** - * Creates a new AwsCluster instance using the specified properties. + * AttachedCluster monitoringConfig. + * @member {google.cloud.gkemulticloud.v1.IMonitoringConfig|null|undefined} monitoringConfig + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster + * @instance + */ + AttachedCluster.prototype.monitoringConfig = null; + + /** + * Creates a new AttachedCluster instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static - * @param {google.cloud.gkemulticloud.v1.IAwsCluster=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsCluster} AwsCluster instance + * @param {google.cloud.gkemulticloud.v1.IAttachedCluster=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AttachedCluster} AttachedCluster instance */ - AwsCluster.create = function create(properties) { - return new AwsCluster(properties); + AttachedCluster.create = function create(properties) { + return new AttachedCluster(properties); }; /** - * Encodes the specified AwsCluster message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsCluster.verify|verify} messages. + * Encodes the specified AttachedCluster message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedCluster.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static - * @param {google.cloud.gkemulticloud.v1.IAwsCluster} message AwsCluster message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedCluster} message AttachedCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsCluster.encode = function encode(message, writer) { + AttachedCluster.encode = function encode(message, writer) { 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.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.networking != null && Object.hasOwnProperty.call(message, "networking")) - $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.encode(message.networking, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.awsRegion != null && Object.hasOwnProperty.call(message, "awsRegion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.awsRegion); - if (message.controlPlane != null && Object.hasOwnProperty.call(message, "controlPlane")) - $root.google.cloud.gkemulticloud.v1.AwsControlPlane.encode(message.controlPlane, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.oidcConfig != null && Object.hasOwnProperty.call(message, "oidcConfig")) + $root.google.cloud.gkemulticloud.v1.AttachedOidcConfig.encode(message.oidcConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.platformVersion != null && Object.hasOwnProperty.call(message, "platformVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.platformVersion); + if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) + $root.google.cloud.gkemulticloud.v1.Fleet.encode(message.fleet, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpoint); + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.uid); + writer.uint32(/* id 7, wireType 2 =*/58).string(message.uid); if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.reconciling); + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.reconciling); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.kubernetesVersion != null && Object.hasOwnProperty.call(message, "kubernetesVersion")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.kubernetesVersion); 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) - $root.google.cloud.gkemulticloud.v1.AwsAuthorization.encode(message.authorization, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); if (message.workloadIdentityConfig != null && Object.hasOwnProperty.call(message, "workloadIdentityConfig")) - $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.clusterCaCertificate != null && Object.hasOwnProperty.call(message, "clusterCaCertificate")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.clusterCaCertificate); - if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) - $root.google.cloud.gkemulticloud.v1.Fleet.encode(message.fleet, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.cloud.gkemulticloud.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + $root.google.cloud.gkemulticloud.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.distribution != null && Object.hasOwnProperty.call(message, "distribution")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.distribution); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.gkemulticloud.v1.AttachedClusterError.encode(message.errors[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) + $root.google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.encode(message.authorization, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.clusterRegion != null && Object.hasOwnProperty.call(message, "clusterRegion")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.clusterRegion); + if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) + $root.google.cloud.gkemulticloud.v1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); return writer; }; /** - * Encodes the specified AwsCluster message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsCluster.verify|verify} messages. + * Encodes the specified AttachedCluster message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedCluster.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static - * @param {google.cloud.gkemulticloud.v1.IAwsCluster} message AwsCluster message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedCluster} message AttachedCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsCluster.encodeDelimited = function encodeDelimited(message, writer) { + AttachedCluster.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsCluster message from the specified reader or buffer. + * Decodes an AttachedCluster message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsCluster} AwsCluster + * @returns {google.cloud.gkemulticloud.v1.AttachedCluster} AttachedCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsCluster.decode = function decode(reader, length) { + AttachedCluster.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsCluster(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AttachedCluster(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -356,50 +380,54 @@ break; } case 3: { - message.networking = $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.decode(reader, reader.uint32()); + message.oidcConfig = $root.google.cloud.gkemulticloud.v1.AttachedOidcConfig.decode(reader, reader.uint32()); break; } case 4: { - message.awsRegion = reader.string(); + message.platformVersion = reader.string(); + break; + } + case 16: { + message.distribution = reader.string(); + break; + } + case 22: { + message.clusterRegion = reader.string(); break; } case 5: { - message.controlPlane = $root.google.cloud.gkemulticloud.v1.AwsControlPlane.decode(reader, reader.uint32()); + message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.decode(reader, reader.uint32()); break; } - case 15: { - message.authorization = $root.google.cloud.gkemulticloud.v1.AwsAuthorization.decode(reader, reader.uint32()); + case 6: { + message.state = reader.int32(); break; } case 7: { - message.state = reader.int32(); + message.uid = reader.string(); break; } case 8: { - message.endpoint = reader.string(); + message.reconciling = reader.bool(); break; } case 9: { - message.uid = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 10: { - message.reconciling = reader.bool(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 11: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.etag = reader.string(); break; } case 12: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.kubernetesVersion = reader.string(); break; } case 13: { - message.etag = reader.string(); - break; - } - case 14: { if (message.annotations === $util.emptyObject) message.annotations = {}; var end2 = reader.uint32() + reader.pos; @@ -422,20 +450,26 @@ message.annotations[key] = value; break; } - case 16: { + case 14: { message.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.decode(reader, reader.uint32()); break; } - case 17: { - message.clusterCaCertificate = reader.string(); + case 15: { + message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.decode(reader, reader.uint32()); break; } - case 18: { - message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.decode(reader, reader.uint32()); + case 20: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.gkemulticloud.v1.AttachedClusterError.decode(reader, reader.uint32())); break; } - case 19: { - message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.decode(reader, reader.uint32()); + case 21: { + message.authorization = $root.google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.decode(reader, reader.uint32()); + break; + } + case 23: { + message.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.decode(reader, reader.uint32()); break; } default: @@ -447,30 +481,30 @@ }; /** - * Decodes an AwsCluster message from the specified reader or buffer, length delimited. + * Decodes an AttachedCluster message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsCluster} AwsCluster + * @returns {google.cloud.gkemulticloud.v1.AttachedCluster} AttachedCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsCluster.decodeDelimited = function decodeDelimited(reader) { + AttachedCluster.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsCluster message. + * Verifies an AttachedCluster message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsCluster.verify = function verify(message) { + AttachedCluster.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -479,23 +513,24 @@ if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected"; - if (message.networking != null && message.hasOwnProperty("networking")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify(message.networking); - if (error) - return "networking." + error; - } - if (message.awsRegion != null && message.hasOwnProperty("awsRegion")) - if (!$util.isString(message.awsRegion)) - return "awsRegion: string expected"; - if (message.controlPlane != null && message.hasOwnProperty("controlPlane")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsControlPlane.verify(message.controlPlane); + if (message.oidcConfig != null && message.hasOwnProperty("oidcConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AttachedOidcConfig.verify(message.oidcConfig); if (error) - return "controlPlane." + error; - } - if (message.authorization != null && message.hasOwnProperty("authorization")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsAuthorization.verify(message.authorization); + return "oidcConfig." + error; + } + if (message.platformVersion != null && message.hasOwnProperty("platformVersion")) + if (!$util.isString(message.platformVersion)) + return "platformVersion: string expected"; + if (message.distribution != null && message.hasOwnProperty("distribution")) + if (!$util.isString(message.distribution)) + return "distribution: string expected"; + if (message.clusterRegion != null && message.hasOwnProperty("clusterRegion")) + if (!$util.isString(message.clusterRegion)) + return "clusterRegion: string expected"; + if (message.fleet != null && message.hasOwnProperty("fleet")) { + var error = $root.google.cloud.gkemulticloud.v1.Fleet.verify(message.fleet); if (error) - return "authorization." + error; + return "fleet." + error; } if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { @@ -510,9 +545,6 @@ case 6: break; } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; if (message.uid != null && message.hasOwnProperty("uid")) if (!$util.isString(message.uid)) return "uid: string expected"; @@ -532,6 +564,9 @@ if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; + if (message.kubernetesVersion != null && message.hasOwnProperty("kubernetesVersion")) + if (!$util.isString(message.kubernetesVersion)) + return "kubernetesVersion: string expected"; if (message.annotations != null && message.hasOwnProperty("annotations")) { if (!$util.isObject(message.annotations)) return "annotations: object expected"; @@ -545,54 +580,64 @@ if (error) return "workloadIdentityConfig." + error; } - if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) - if (!$util.isString(message.clusterCaCertificate)) - return "clusterCaCertificate: string expected"; - if (message.fleet != null && message.hasOwnProperty("fleet")) { - var error = $root.google.cloud.gkemulticloud.v1.Fleet.verify(message.fleet); - if (error) - return "fleet." + error; - } if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { var error = $root.google.cloud.gkemulticloud.v1.LoggingConfig.verify(message.loggingConfig); if (error) return "loggingConfig." + error; } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AttachedClusterError.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + if (message.authorization != null && message.hasOwnProperty("authorization")) { + var error = $root.google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.verify(message.authorization); + if (error) + return "authorization." + error; + } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.verify(message.monitoringConfig); + if (error) + return "monitoringConfig." + error; + } return null; }; /** - * Creates an AwsCluster message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedCluster message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsCluster} AwsCluster + * @returns {google.cloud.gkemulticloud.v1.AttachedCluster} AttachedCluster */ - AwsCluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsCluster) + AttachedCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AttachedCluster) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsCluster(); + var message = new $root.google.cloud.gkemulticloud.v1.AttachedCluster(); if (object.name != null) message.name = String(object.name); if (object.description != null) message.description = String(object.description); - if (object.networking != null) { - if (typeof object.networking !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.networking: object expected"); - message.networking = $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.fromObject(object.networking); - } - if (object.awsRegion != null) - message.awsRegion = String(object.awsRegion); - if (object.controlPlane != null) { - if (typeof object.controlPlane !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.controlPlane: object expected"); - message.controlPlane = $root.google.cloud.gkemulticloud.v1.AwsControlPlane.fromObject(object.controlPlane); - } - if (object.authorization != null) { - if (typeof object.authorization !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.authorization: object expected"); - message.authorization = $root.google.cloud.gkemulticloud.v1.AwsAuthorization.fromObject(object.authorization); + if (object.oidcConfig != null) { + if (typeof object.oidcConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.oidcConfig: object expected"); + message.oidcConfig = $root.google.cloud.gkemulticloud.v1.AttachedOidcConfig.fromObject(object.oidcConfig); + } + if (object.platformVersion != null) + message.platformVersion = String(object.platformVersion); + if (object.distribution != null) + message.distribution = String(object.distribution); + if (object.clusterRegion != null) + message.clusterRegion = String(object.clusterRegion); + if (object.fleet != null) { + if (typeof object.fleet !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.fleet: object expected"); + message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.fromObject(object.fleet); } switch (object.state) { default: @@ -630,99 +675,113 @@ message.state = 6; break; } - if (object.endpoint != null) - message.endpoint = String(object.endpoint); if (object.uid != null) message.uid = String(object.uid); if (object.reconciling != null) message.reconciling = Boolean(object.reconciling); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.createTime: object expected"); + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.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.gkemulticloud.v1.AwsCluster.updateTime: object expected"); + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.etag != null) message.etag = String(object.etag); + if (object.kubernetesVersion != null) + message.kubernetesVersion = String(object.kubernetesVersion); if (object.annotations) { if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.annotations: object expected"); + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.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.workloadIdentityConfig != null) { if (typeof object.workloadIdentityConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.workloadIdentityConfig: object expected"); + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.workloadIdentityConfig: object expected"); message.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.fromObject(object.workloadIdentityConfig); } - if (object.clusterCaCertificate != null) - message.clusterCaCertificate = String(object.clusterCaCertificate); - if (object.fleet != null) { - if (typeof object.fleet !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.fleet: object expected"); - message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.fromObject(object.fleet); - } if (object.loggingConfig != null) { if (typeof object.loggingConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.loggingConfig: object expected"); + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.loggingConfig: object expected"); message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.fromObject(object.loggingConfig); } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.errors: object expected"); + message.errors[i] = $root.google.cloud.gkemulticloud.v1.AttachedClusterError.fromObject(object.errors[i]); + } + } + if (object.authorization != null) { + if (typeof object.authorization !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.authorization: object expected"); + message.authorization = $root.google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.fromObject(object.authorization); + } + if (object.monitoringConfig != null) { + if (typeof object.monitoringConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedCluster.monitoringConfig: object expected"); + message.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.fromObject(object.monitoringConfig); + } return message; }; /** - * Creates a plain object from an AwsCluster message. Also converts values to other types if specified. + * Creates a plain object from an AttachedCluster message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static - * @param {google.cloud.gkemulticloud.v1.AwsCluster} message AwsCluster + * @param {google.cloud.gkemulticloud.v1.AttachedCluster} message AttachedCluster * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsCluster.toObject = function toObject(message, options) { + AttachedCluster.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errors = []; if (options.objects || options.defaults) object.annotations = {}; if (options.defaults) { object.name = ""; object.description = ""; - object.networking = null; - object.awsRegion = ""; - object.controlPlane = null; + object.oidcConfig = null; + object.platformVersion = ""; + object.fleet = null; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.endpoint = ""; object.uid = ""; object.reconciling = false; object.createTime = null; object.updateTime = null; object.etag = ""; - object.authorization = null; + object.kubernetesVersion = ""; object.workloadIdentityConfig = null; - object.clusterCaCertificate = ""; - object.fleet = null; object.loggingConfig = null; + object.distribution = ""; + object.authorization = null; + object.clusterRegion = ""; + object.monitoringConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.description != null && message.hasOwnProperty("description")) object.description = message.description; - if (message.networking != null && message.hasOwnProperty("networking")) - object.networking = $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.toObject(message.networking, options); - if (message.awsRegion != null && message.hasOwnProperty("awsRegion")) - object.awsRegion = message.awsRegion; - if (message.controlPlane != null && message.hasOwnProperty("controlPlane")) - object.controlPlane = $root.google.cloud.gkemulticloud.v1.AwsControlPlane.toObject(message.controlPlane, options); + if (message.oidcConfig != null && message.hasOwnProperty("oidcConfig")) + object.oidcConfig = $root.google.cloud.gkemulticloud.v1.AttachedOidcConfig.toObject(message.oidcConfig, options); + if (message.platformVersion != null && message.hasOwnProperty("platformVersion")) + object.platformVersion = message.platformVersion; + if (message.fleet != null && message.hasOwnProperty("fleet")) + object.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.toObject(message.fleet, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AwsCluster.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AwsCluster.State[message.state] : message.state; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; + object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AttachedCluster.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AttachedCluster.State[message.state] : message.state; if (message.uid != null && message.hasOwnProperty("uid")) object.uid = message.uid; if (message.reconciling != null && message.hasOwnProperty("reconciling")) @@ -733,54 +792,63 @@ object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; + if (message.kubernetesVersion != null && message.hasOwnProperty("kubernetesVersion")) + object.kubernetesVersion = message.kubernetesVersion; 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.authorization != null && message.hasOwnProperty("authorization")) - object.authorization = $root.google.cloud.gkemulticloud.v1.AwsAuthorization.toObject(message.authorization, options); if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) object.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.toObject(message.workloadIdentityConfig, options); - if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) - object.clusterCaCertificate = message.clusterCaCertificate; - if (message.fleet != null && message.hasOwnProperty("fleet")) - object.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.toObject(message.fleet, options); if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) object.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.toObject(message.loggingConfig, options); + if (message.distribution != null && message.hasOwnProperty("distribution")) + object.distribution = message.distribution; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.gkemulticloud.v1.AttachedClusterError.toObject(message.errors[j], options); + } + if (message.authorization != null && message.hasOwnProperty("authorization")) + object.authorization = $root.google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.toObject(message.authorization, options); + if (message.clusterRegion != null && message.hasOwnProperty("clusterRegion")) + object.clusterRegion = message.clusterRegion; + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) + object.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.toObject(message.monitoringConfig, options); return object; }; /** - * Converts this AwsCluster to JSON. + * Converts this AttachedCluster to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @instance * @returns {Object.} JSON object */ - AwsCluster.prototype.toJSON = function toJSON() { + AttachedCluster.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsCluster + * Gets the default type url for AttachedCluster * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedCluster * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttachedCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsCluster"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AttachedCluster"; }; /** * State enum. - * @name google.cloud.gkemulticloud.v1.AwsCluster.State + * @name google.cloud.gkemulticloud.v1.AttachedCluster.State * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value * @property {number} PROVISIONING=1 PROVISIONING value @@ -790,7 +858,7 @@ * @property {number} ERROR=5 ERROR value * @property {number} DEGRADED=6 DEGRADED value */ - AwsCluster.State = (function() { + AttachedCluster.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; values[valuesById[1] = "PROVISIONING"] = 1; @@ -802,43 +870,28 @@ return values; })(); - return AwsCluster; + return AttachedCluster; })(); - v1.AwsControlPlane = (function() { + v1.AttachedClustersAuthorization = (function() { /** - * Properties of an AwsControlPlane. + * Properties of an AttachedClustersAuthorization. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsControlPlane - * @property {string|null} [version] AwsControlPlane version - * @property {string|null} [instanceType] AwsControlPlane instanceType - * @property {google.cloud.gkemulticloud.v1.IAwsSshConfig|null} [sshConfig] AwsControlPlane sshConfig - * @property {Array.|null} [subnetIds] AwsControlPlane subnetIds - * @property {Array.|null} [securityGroupIds] AwsControlPlane securityGroupIds - * @property {string|null} [iamInstanceProfile] AwsControlPlane iamInstanceProfile - * @property {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null} [rootVolume] AwsControlPlane rootVolume - * @property {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null} [mainVolume] AwsControlPlane mainVolume - * @property {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption|null} [databaseEncryption] AwsControlPlane databaseEncryption - * @property {Object.|null} [tags] AwsControlPlane tags - * @property {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication|null} [awsServicesAuthentication] AwsControlPlane awsServicesAuthentication - * @property {google.cloud.gkemulticloud.v1.IAwsProxyConfig|null} [proxyConfig] AwsControlPlane proxyConfig - * @property {google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null} [configEncryption] AwsControlPlane configEncryption - * @property {google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null} [instancePlacement] AwsControlPlane instancePlacement + * @interface IAttachedClustersAuthorization + * @property {Array.|null} [adminUsers] AttachedClustersAuthorization adminUsers */ /** - * Constructs a new AwsControlPlane. + * Constructs a new AttachedClustersAuthorization. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsControlPlane. - * @implements IAwsControlPlane + * @classdesc Represents an AttachedClustersAuthorization. + * @implements IAttachedClustersAuthorization * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsControlPlane=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization=} [properties] Properties to set */ - function AwsControlPlane(properties) { - this.subnetIds = []; - this.securityGroupIds = []; - this.tags = {}; + function AttachedClustersAuthorization(properties) { + this.adminUsers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -846,283 +899,78 @@ } /** - * AwsControlPlane version. - * @member {string} version - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.version = ""; - - /** - * AwsControlPlane instanceType. - * @member {string} instanceType - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.instanceType = ""; - - /** - * AwsControlPlane sshConfig. - * @member {google.cloud.gkemulticloud.v1.IAwsSshConfig|null|undefined} sshConfig - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.sshConfig = null; - - /** - * AwsControlPlane subnetIds. - * @member {Array.} subnetIds - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.subnetIds = $util.emptyArray; - - /** - * AwsControlPlane securityGroupIds. - * @member {Array.} securityGroupIds - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.securityGroupIds = $util.emptyArray; - - /** - * AwsControlPlane iamInstanceProfile. - * @member {string} iamInstanceProfile - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.iamInstanceProfile = ""; - - /** - * AwsControlPlane rootVolume. - * @member {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null|undefined} rootVolume - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.rootVolume = null; - - /** - * AwsControlPlane mainVolume. - * @member {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null|undefined} mainVolume - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.mainVolume = null; - - /** - * AwsControlPlane databaseEncryption. - * @member {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption|null|undefined} databaseEncryption - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.databaseEncryption = null; - - /** - * AwsControlPlane tags. - * @member {Object.} tags - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.tags = $util.emptyObject; - - /** - * AwsControlPlane awsServicesAuthentication. - * @member {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication|null|undefined} awsServicesAuthentication - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.awsServicesAuthentication = null; - - /** - * AwsControlPlane proxyConfig. - * @member {google.cloud.gkemulticloud.v1.IAwsProxyConfig|null|undefined} proxyConfig - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.proxyConfig = null; - - /** - * AwsControlPlane configEncryption. - * @member {google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null|undefined} configEncryption - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane - * @instance - */ - AwsControlPlane.prototype.configEncryption = null; - - /** - * AwsControlPlane instancePlacement. - * @member {google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null|undefined} instancePlacement - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * AttachedClustersAuthorization adminUsers. + * @member {Array.} adminUsers + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @instance */ - AwsControlPlane.prototype.instancePlacement = null; + AttachedClustersAuthorization.prototype.adminUsers = $util.emptyArray; /** - * Creates a new AwsControlPlane instance using the specified properties. + * Creates a new AttachedClustersAuthorization instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IAwsControlPlane=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsControlPlane} AwsControlPlane instance + * @param {google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AttachedClustersAuthorization} AttachedClustersAuthorization instance */ - AwsControlPlane.create = function create(properties) { - return new AwsControlPlane(properties); + AttachedClustersAuthorization.create = function create(properties) { + return new AttachedClustersAuthorization(properties); }; /** - * Encodes the specified AwsControlPlane message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsControlPlane.verify|verify} messages. + * Encodes the specified AttachedClustersAuthorization message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IAwsControlPlane} message AwsControlPlane message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization} message AttachedClustersAuthorization message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsControlPlane.encode = function encode(message, writer) { + AttachedClustersAuthorization.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.instanceType != null && Object.hasOwnProperty.call(message, "instanceType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceType); - if (message.subnetIds != null && message.subnetIds.length) - for (var i = 0; i < message.subnetIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.subnetIds[i]); - if (message.securityGroupIds != null && message.securityGroupIds.length) - for (var i = 0; i < message.securityGroupIds.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.securityGroupIds[i]); - if (message.iamInstanceProfile != null && Object.hasOwnProperty.call(message, "iamInstanceProfile")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.iamInstanceProfile); - if (message.rootVolume != null && Object.hasOwnProperty.call(message, "rootVolume")) - $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.encode(message.rootVolume, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.mainVolume != null && Object.hasOwnProperty.call(message, "mainVolume")) - $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.encode(message.mainVolume, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.databaseEncryption != null && Object.hasOwnProperty.call(message, "databaseEncryption")) - $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.encode(message.databaseEncryption, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); - if (message.awsServicesAuthentication != null && Object.hasOwnProperty.call(message, "awsServicesAuthentication")) - $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.encode(message.awsServicesAuthentication, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.sshConfig != null && Object.hasOwnProperty.call(message, "sshConfig")) - $root.google.cloud.gkemulticloud.v1.AwsSshConfig.encode(message.sshConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.proxyConfig != null && Object.hasOwnProperty.call(message, "proxyConfig")) - $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.encode(message.proxyConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.configEncryption != null && Object.hasOwnProperty.call(message, "configEncryption")) - $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.encode(message.configEncryption, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.instancePlacement != null && Object.hasOwnProperty.call(message, "instancePlacement")) - $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.encode(message.instancePlacement, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.adminUsers != null && message.adminUsers.length) + for (var i = 0; i < message.adminUsers.length; ++i) + $root.google.cloud.gkemulticloud.v1.AttachedClusterUser.encode(message.adminUsers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AwsControlPlane message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsControlPlane.verify|verify} messages. + * Encodes the specified AttachedClustersAuthorization message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IAwsControlPlane} message AwsControlPlane message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedClustersAuthorization} message AttachedClustersAuthorization message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsControlPlane.encodeDelimited = function encodeDelimited(message, writer) { + AttachedClustersAuthorization.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsControlPlane message from the specified reader or buffer. + * Decodes an AttachedClustersAuthorization message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsControlPlane} AwsControlPlane + * @returns {google.cloud.gkemulticloud.v1.AttachedClustersAuthorization} AttachedClustersAuthorization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsControlPlane.decode = function decode(reader, length) { + AttachedClustersAuthorization.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsControlPlane(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AttachedClustersAuthorization(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.instanceType = reader.string(); - break; - } - case 14: { - message.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.subnetIds && message.subnetIds.length)) - message.subnetIds = []; - message.subnetIds.push(reader.string()); - break; - } - case 5: { - if (!(message.securityGroupIds && message.securityGroupIds.length)) - message.securityGroupIds = []; - message.securityGroupIds.push(reader.string()); - break; - } - case 7: { - message.iamInstanceProfile = reader.string(); - break; - } - case 8: { - message.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.decode(reader, reader.uint32()); - break; - } - case 9: { - message.mainVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.decode(reader, reader.uint32()); - break; - } - case 10: { - message.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.decode(reader, reader.uint32()); - break; - } - case 11: { - if (message.tags === $util.emptyObject) - message.tags = {}; - 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.tags[key] = value; - break; - } - case 12: { - message.awsServicesAuthentication = $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.decode(reader, reader.uint32()); - break; - } - case 16: { - message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.decode(reader, reader.uint32()); - break; - } - case 17: { - message.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.decode(reader, reader.uint32()); - break; - } - case 18: { - message.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.decode(reader, reader.uint32()); + if (!(message.adminUsers && message.adminUsers.length)) + message.adminUsers = []; + message.adminUsers.push($root.google.cloud.gkemulticloud.v1.AttachedClusterUser.decode(reader, reader.uint32())); break; } default: @@ -1134,309 +982,139 @@ }; /** - * Decodes an AwsControlPlane message from the specified reader or buffer, length delimited. + * Decodes an AttachedClustersAuthorization message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsControlPlane} AwsControlPlane + * @returns {google.cloud.gkemulticloud.v1.AttachedClustersAuthorization} AttachedClustersAuthorization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsControlPlane.decodeDelimited = function decodeDelimited(reader) { + AttachedClustersAuthorization.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsControlPlane message. + * Verifies an AttachedClustersAuthorization message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsControlPlane.verify = function verify(message) { + AttachedClustersAuthorization.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.instanceType != null && message.hasOwnProperty("instanceType")) - if (!$util.isString(message.instanceType)) - return "instanceType: string expected"; - if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.verify(message.sshConfig); - if (error) - return "sshConfig." + error; - } - if (message.subnetIds != null && message.hasOwnProperty("subnetIds")) { - if (!Array.isArray(message.subnetIds)) - return "subnetIds: array expected"; - for (var i = 0; i < message.subnetIds.length; ++i) - if (!$util.isString(message.subnetIds[i])) - return "subnetIds: string[] expected"; - } - if (message.securityGroupIds != null && message.hasOwnProperty("securityGroupIds")) { - if (!Array.isArray(message.securityGroupIds)) - return "securityGroupIds: array expected"; - for (var i = 0; i < message.securityGroupIds.length; ++i) - if (!$util.isString(message.securityGroupIds[i])) - return "securityGroupIds: string[] expected"; - } - if (message.iamInstanceProfile != null && message.hasOwnProperty("iamInstanceProfile")) - if (!$util.isString(message.iamInstanceProfile)) - return "iamInstanceProfile: string expected"; - if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify(message.rootVolume); - if (error) - return "rootVolume." + error; - } - if (message.mainVolume != null && message.hasOwnProperty("mainVolume")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify(message.mainVolume); - if (error) - return "mainVolume." + error; - } - if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify(message.databaseEncryption); - if (error) - return "databaseEncryption." + error; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!$util.isObject(message.tags)) - return "tags: object expected"; - var key = Object.keys(message.tags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) - return "tags: string{k:string} expected"; - } - if (message.awsServicesAuthentication != null && message.hasOwnProperty("awsServicesAuthentication")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify(message.awsServicesAuthentication); - if (error) - return "awsServicesAuthentication." + error; - } - if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.verify(message.proxyConfig); - if (error) - return "proxyConfig." + error; - } - if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify(message.configEncryption); - if (error) - return "configEncryption." + error; - } - if (message.instancePlacement != null && message.hasOwnProperty("instancePlacement")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify(message.instancePlacement); - if (error) - return "instancePlacement." + error; + if (message.adminUsers != null && message.hasOwnProperty("adminUsers")) { + if (!Array.isArray(message.adminUsers)) + return "adminUsers: array expected"; + for (var i = 0; i < message.adminUsers.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AttachedClusterUser.verify(message.adminUsers[i]); + if (error) + return "adminUsers." + error; + } } return null; }; /** - * Creates an AwsControlPlane message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedClustersAuthorization message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsControlPlane} AwsControlPlane + * @returns {google.cloud.gkemulticloud.v1.AttachedClustersAuthorization} AttachedClustersAuthorization */ - AwsControlPlane.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsControlPlane) + AttachedClustersAuthorization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AttachedClustersAuthorization) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsControlPlane(); - if (object.version != null) - message.version = String(object.version); - if (object.instanceType != null) - message.instanceType = String(object.instanceType); - if (object.sshConfig != null) { - if (typeof object.sshConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.sshConfig: object expected"); - message.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.fromObject(object.sshConfig); - } - if (object.subnetIds) { - if (!Array.isArray(object.subnetIds)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.subnetIds: array expected"); - message.subnetIds = []; - for (var i = 0; i < object.subnetIds.length; ++i) - message.subnetIds[i] = String(object.subnetIds[i]); - } - if (object.securityGroupIds) { - if (!Array.isArray(object.securityGroupIds)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.securityGroupIds: array expected"); - message.securityGroupIds = []; - for (var i = 0; i < object.securityGroupIds.length; ++i) - message.securityGroupIds[i] = String(object.securityGroupIds[i]); - } - if (object.iamInstanceProfile != null) - message.iamInstanceProfile = String(object.iamInstanceProfile); - if (object.rootVolume != null) { - if (typeof object.rootVolume !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.rootVolume: object expected"); - message.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.fromObject(object.rootVolume); - } - if (object.mainVolume != null) { - if (typeof object.mainVolume !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.mainVolume: object expected"); - message.mainVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.fromObject(object.mainVolume); - } - if (object.databaseEncryption != null) { - if (typeof object.databaseEncryption !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.databaseEncryption: object expected"); - message.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.fromObject(object.databaseEncryption); - } - if (object.tags) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.tags: object expected"); - message.tags = {}; - for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) - message.tags[keys[i]] = String(object.tags[keys[i]]); - } - if (object.awsServicesAuthentication != null) { - if (typeof object.awsServicesAuthentication !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.awsServicesAuthentication: object expected"); - message.awsServicesAuthentication = $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.fromObject(object.awsServicesAuthentication); - } - if (object.proxyConfig != null) { - if (typeof object.proxyConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.proxyConfig: object expected"); - message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.fromObject(object.proxyConfig); - } - if (object.configEncryption != null) { - if (typeof object.configEncryption !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.configEncryption: object expected"); - message.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.fromObject(object.configEncryption); - } - if (object.instancePlacement != null) { - if (typeof object.instancePlacement !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.instancePlacement: object expected"); - message.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.fromObject(object.instancePlacement); + var message = new $root.google.cloud.gkemulticloud.v1.AttachedClustersAuthorization(); + if (object.adminUsers) { + if (!Array.isArray(object.adminUsers)) + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.adminUsers: array expected"); + message.adminUsers = []; + for (var i = 0; i < object.adminUsers.length; ++i) { + if (typeof object.adminUsers[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedClustersAuthorization.adminUsers: object expected"); + message.adminUsers[i] = $root.google.cloud.gkemulticloud.v1.AttachedClusterUser.fromObject(object.adminUsers[i]); + } } return message; }; /** - * Creates a plain object from an AwsControlPlane message. Also converts values to other types if specified. + * Creates a plain object from an AttachedClustersAuthorization message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.AwsControlPlane} message AwsControlPlane + * @param {google.cloud.gkemulticloud.v1.AttachedClustersAuthorization} message AttachedClustersAuthorization * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsControlPlane.toObject = function toObject(message, options) { + AttachedClustersAuthorization.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.subnetIds = []; - object.securityGroupIds = []; + if (options.arrays || options.defaults) + object.adminUsers = []; + if (message.adminUsers && message.adminUsers.length) { + object.adminUsers = []; + for (var j = 0; j < message.adminUsers.length; ++j) + object.adminUsers[j] = $root.google.cloud.gkemulticloud.v1.AttachedClusterUser.toObject(message.adminUsers[j], options); } - if (options.objects || options.defaults) - object.tags = {}; - if (options.defaults) { - object.version = ""; - object.instanceType = ""; - object.iamInstanceProfile = ""; - object.rootVolume = null; - object.mainVolume = null; - object.databaseEncryption = null; - object.awsServicesAuthentication = null; - object.sshConfig = null; - object.proxyConfig = null; - object.configEncryption = null; - object.instancePlacement = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.instanceType != null && message.hasOwnProperty("instanceType")) - object.instanceType = message.instanceType; - if (message.subnetIds && message.subnetIds.length) { - object.subnetIds = []; - for (var j = 0; j < message.subnetIds.length; ++j) - object.subnetIds[j] = message.subnetIds[j]; - } - if (message.securityGroupIds && message.securityGroupIds.length) { - object.securityGroupIds = []; - for (var j = 0; j < message.securityGroupIds.length; ++j) - object.securityGroupIds[j] = message.securityGroupIds[j]; - } - if (message.iamInstanceProfile != null && message.hasOwnProperty("iamInstanceProfile")) - object.iamInstanceProfile = message.iamInstanceProfile; - if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) - object.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.toObject(message.rootVolume, options); - if (message.mainVolume != null && message.hasOwnProperty("mainVolume")) - object.mainVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.toObject(message.mainVolume, options); - if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) - object.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.toObject(message.databaseEncryption, options); - var keys2; - if (message.tags && (keys2 = Object.keys(message.tags)).length) { - object.tags = {}; - for (var j = 0; j < keys2.length; ++j) - object.tags[keys2[j]] = message.tags[keys2[j]]; - } - if (message.awsServicesAuthentication != null && message.hasOwnProperty("awsServicesAuthentication")) - object.awsServicesAuthentication = $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.toObject(message.awsServicesAuthentication, options); - if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) - object.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.toObject(message.sshConfig, options); - if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) - object.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.toObject(message.proxyConfig, options); - if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) - object.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.toObject(message.configEncryption, options); - if (message.instancePlacement != null && message.hasOwnProperty("instancePlacement")) - object.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.toObject(message.instancePlacement, options); return object; }; /** - * Converts this AwsControlPlane to JSON. + * Converts this AttachedClustersAuthorization to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @instance * @returns {Object.} JSON object */ - AwsControlPlane.prototype.toJSON = function toJSON() { + AttachedClustersAuthorization.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsControlPlane + * Gets the default type url for AttachedClustersAuthorization * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @memberof google.cloud.gkemulticloud.v1.AttachedClustersAuthorization * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsControlPlane.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttachedClustersAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsControlPlane"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AttachedClustersAuthorization"; }; - return AwsControlPlane; + return AttachedClustersAuthorization; })(); - v1.AwsServicesAuthentication = (function() { + v1.AttachedClusterUser = (function() { /** - * Properties of an AwsServicesAuthentication. + * Properties of an AttachedClusterUser. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsServicesAuthentication - * @property {string|null} [roleArn] AwsServicesAuthentication roleArn - * @property {string|null} [roleSessionName] AwsServicesAuthentication roleSessionName + * @interface IAttachedClusterUser + * @property {string|null} [username] AttachedClusterUser username */ /** - * Constructs a new AwsServicesAuthentication. + * Constructs a new AttachedClusterUser. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsServicesAuthentication. - * @implements IAwsServicesAuthentication + * @classdesc Represents an AttachedClusterUser. + * @implements IAttachedClusterUser * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAttachedClusterUser=} [properties] Properties to set */ - function AwsServicesAuthentication(properties) { + function AttachedClusterUser(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1444,89 +1122,75 @@ } /** - * AwsServicesAuthentication roleArn. - * @member {string} roleArn - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication - * @instance - */ - AwsServicesAuthentication.prototype.roleArn = ""; - - /** - * AwsServicesAuthentication roleSessionName. - * @member {string} roleSessionName - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * AttachedClusterUser username. + * @member {string} username + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @instance */ - AwsServicesAuthentication.prototype.roleSessionName = ""; + AttachedClusterUser.prototype.username = ""; /** - * Creates a new AwsServicesAuthentication instance using the specified properties. + * Creates a new AttachedClusterUser instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} AwsServicesAuthentication instance + * @param {google.cloud.gkemulticloud.v1.IAttachedClusterUser=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AttachedClusterUser} AttachedClusterUser instance */ - AwsServicesAuthentication.create = function create(properties) { - return new AwsServicesAuthentication(properties); + AttachedClusterUser.create = function create(properties) { + return new AttachedClusterUser(properties); }; /** - * Encodes the specified AwsServicesAuthentication message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify|verify} messages. + * Encodes the specified AttachedClusterUser message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClusterUser.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication} message AwsServicesAuthentication message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedClusterUser} message AttachedClusterUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsServicesAuthentication.encode = function encode(message, writer) { + AttachedClusterUser.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.roleArn != null && Object.hasOwnProperty.call(message, "roleArn")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.roleArn); - if (message.roleSessionName != null && Object.hasOwnProperty.call(message, "roleSessionName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.roleSessionName); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); return writer; }; /** - * Encodes the specified AwsServicesAuthentication message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify|verify} messages. + * Encodes the specified AttachedClusterUser message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClusterUser.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication} message AwsServicesAuthentication message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedClusterUser} message AttachedClusterUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsServicesAuthentication.encodeDelimited = function encodeDelimited(message, writer) { + AttachedClusterUser.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsServicesAuthentication message from the specified reader or buffer. + * Decodes an AttachedClusterUser message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} AwsServicesAuthentication + * @returns {google.cloud.gkemulticloud.v1.AttachedClusterUser} AttachedClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsServicesAuthentication.decode = function decode(reader, length) { + AttachedClusterUser.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AttachedClusterUser(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.roleArn = reader.string(); - break; - } - case 2: { - message.roleSessionName = reader.string(); + message.username = reader.string(); break; } default: @@ -1538,132 +1202,123 @@ }; /** - * Decodes an AwsServicesAuthentication message from the specified reader or buffer, length delimited. + * Decodes an AttachedClusterUser message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} AwsServicesAuthentication + * @returns {google.cloud.gkemulticloud.v1.AttachedClusterUser} AttachedClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsServicesAuthentication.decodeDelimited = function decodeDelimited(reader) { + AttachedClusterUser.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsServicesAuthentication message. + * Verifies an AttachedClusterUser message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsServicesAuthentication.verify = function verify(message) { + AttachedClusterUser.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.roleArn != null && message.hasOwnProperty("roleArn")) - if (!$util.isString(message.roleArn)) - return "roleArn: string expected"; - if (message.roleSessionName != null && message.hasOwnProperty("roleSessionName")) - if (!$util.isString(message.roleSessionName)) - return "roleSessionName: string expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; return null; }; /** - * Creates an AwsServicesAuthentication message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedClusterUser message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} AwsServicesAuthentication + * @returns {google.cloud.gkemulticloud.v1.AttachedClusterUser} AttachedClusterUser */ - AwsServicesAuthentication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication) + AttachedClusterUser.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AttachedClusterUser) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication(); - if (object.roleArn != null) - message.roleArn = String(object.roleArn); - if (object.roleSessionName != null) - message.roleSessionName = String(object.roleSessionName); + var message = new $root.google.cloud.gkemulticloud.v1.AttachedClusterUser(); + if (object.username != null) + message.username = String(object.username); return message; }; /** - * Creates a plain object from an AwsServicesAuthentication message. Also converts values to other types if specified. + * Creates a plain object from an AttachedClusterUser message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} message AwsServicesAuthentication + * @param {google.cloud.gkemulticloud.v1.AttachedClusterUser} message AttachedClusterUser * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsServicesAuthentication.toObject = function toObject(message, options) { + AttachedClusterUser.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.roleArn = ""; - object.roleSessionName = ""; - } - if (message.roleArn != null && message.hasOwnProperty("roleArn")) - object.roleArn = message.roleArn; - if (message.roleSessionName != null && message.hasOwnProperty("roleSessionName")) - object.roleSessionName = message.roleSessionName; + if (options.defaults) + object.username = ""; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; return object; }; /** - * Converts this AwsServicesAuthentication to JSON. + * Converts this AttachedClusterUser to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @instance * @returns {Object.} JSON object */ - AwsServicesAuthentication.prototype.toJSON = function toJSON() { + AttachedClusterUser.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsServicesAuthentication + * Gets the default type url for AttachedClusterUser * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterUser * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsServicesAuthentication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttachedClusterUser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsServicesAuthentication"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AttachedClusterUser"; }; - return AwsServicesAuthentication; + return AttachedClusterUser; })(); - v1.AwsAuthorization = (function() { + v1.AttachedOidcConfig = (function() { /** - * Properties of an AwsAuthorization. + * Properties of an AttachedOidcConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsAuthorization - * @property {Array.|null} [adminUsers] AwsAuthorization adminUsers + * @interface IAttachedOidcConfig + * @property {string|null} [issuerUrl] AttachedOidcConfig issuerUrl + * @property {Uint8Array|null} [jwks] AttachedOidcConfig jwks */ /** - * Constructs a new AwsAuthorization. + * Constructs a new AttachedOidcConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsAuthorization. - * @implements IAwsAuthorization + * @classdesc Represents an AttachedOidcConfig. + * @implements IAttachedOidcConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsAuthorization=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAttachedOidcConfig=} [properties] Properties to set */ - function AwsAuthorization(properties) { - this.adminUsers = []; + function AttachedOidcConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1671,78 +1326,89 @@ } /** - * AwsAuthorization adminUsers. - * @member {Array.} adminUsers - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * AttachedOidcConfig issuerUrl. + * @member {string} issuerUrl + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @instance */ - AwsAuthorization.prototype.adminUsers = $util.emptyArray; + AttachedOidcConfig.prototype.issuerUrl = ""; /** - * Creates a new AwsAuthorization instance using the specified properties. + * AttachedOidcConfig jwks. + * @member {Uint8Array} jwks + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig + * @instance + */ + AttachedOidcConfig.prototype.jwks = $util.newBuffer([]); + + /** + * Creates a new AttachedOidcConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsAuthorization=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsAuthorization} AwsAuthorization instance + * @param {google.cloud.gkemulticloud.v1.IAttachedOidcConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AttachedOidcConfig} AttachedOidcConfig instance */ - AwsAuthorization.create = function create(properties) { - return new AwsAuthorization(properties); + AttachedOidcConfig.create = function create(properties) { + return new AttachedOidcConfig(properties); }; /** - * Encodes the specified AwsAuthorization message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAuthorization.verify|verify} messages. + * Encodes the specified AttachedOidcConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedOidcConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsAuthorization} message AwsAuthorization message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedOidcConfig} message AttachedOidcConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsAuthorization.encode = function encode(message, writer) { + AttachedOidcConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.adminUsers != null && message.adminUsers.length) - for (var i = 0; i < message.adminUsers.length; ++i) - $root.google.cloud.gkemulticloud.v1.AwsClusterUser.encode(message.adminUsers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.issuerUrl != null && Object.hasOwnProperty.call(message, "issuerUrl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuerUrl); + if (message.jwks != null && Object.hasOwnProperty.call(message, "jwks")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.jwks); return writer; }; /** - * Encodes the specified AwsAuthorization message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAuthorization.verify|verify} messages. + * Encodes the specified AttachedOidcConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedOidcConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsAuthorization} message AwsAuthorization message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedOidcConfig} message AttachedOidcConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsAuthorization.encodeDelimited = function encodeDelimited(message, writer) { + AttachedOidcConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsAuthorization message from the specified reader or buffer. + * Decodes an AttachedOidcConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsAuthorization} AwsAuthorization + * @returns {google.cloud.gkemulticloud.v1.AttachedOidcConfig} AttachedOidcConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsAuthorization.decode = function decode(reader, length) { + AttachedOidcConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsAuthorization(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AttachedOidcConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.adminUsers && message.adminUsers.length)) - message.adminUsers = []; - message.adminUsers.push($root.google.cloud.gkemulticloud.v1.AwsClusterUser.decode(reader, reader.uint32())); + message.issuerUrl = reader.string(); + break; + } + case 2: { + message.jwks = reader.bytes(); break; } default: @@ -1754,139 +1420,142 @@ }; /** - * Decodes an AwsAuthorization message from the specified reader or buffer, length delimited. + * Decodes an AttachedOidcConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsAuthorization} AwsAuthorization + * @returns {google.cloud.gkemulticloud.v1.AttachedOidcConfig} AttachedOidcConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsAuthorization.decodeDelimited = function decodeDelimited(reader) { + AttachedOidcConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsAuthorization message. + * Verifies an AttachedOidcConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsAuthorization.verify = function verify(message) { + AttachedOidcConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.adminUsers != null && message.hasOwnProperty("adminUsers")) { - if (!Array.isArray(message.adminUsers)) - return "adminUsers: array expected"; - for (var i = 0; i < message.adminUsers.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.AwsClusterUser.verify(message.adminUsers[i]); - if (error) - return "adminUsers." + error; - } - } + if (message.issuerUrl != null && message.hasOwnProperty("issuerUrl")) + if (!$util.isString(message.issuerUrl)) + return "issuerUrl: string expected"; + if (message.jwks != null && message.hasOwnProperty("jwks")) + if (!(message.jwks && typeof message.jwks.length === "number" || $util.isString(message.jwks))) + return "jwks: buffer expected"; return null; }; /** - * Creates an AwsAuthorization message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedOidcConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsAuthorization} AwsAuthorization + * @returns {google.cloud.gkemulticloud.v1.AttachedOidcConfig} AttachedOidcConfig */ - AwsAuthorization.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsAuthorization) + AttachedOidcConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AttachedOidcConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsAuthorization(); - if (object.adminUsers) { - if (!Array.isArray(object.adminUsers)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsAuthorization.adminUsers: array expected"); - message.adminUsers = []; - for (var i = 0; i < object.adminUsers.length; ++i) { - if (typeof object.adminUsers[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsAuthorization.adminUsers: object expected"); - message.adminUsers[i] = $root.google.cloud.gkemulticloud.v1.AwsClusterUser.fromObject(object.adminUsers[i]); - } - } + var message = new $root.google.cloud.gkemulticloud.v1.AttachedOidcConfig(); + if (object.issuerUrl != null) + message.issuerUrl = String(object.issuerUrl); + if (object.jwks != null) + if (typeof object.jwks === "string") + $util.base64.decode(object.jwks, message.jwks = $util.newBuffer($util.base64.length(object.jwks)), 0); + else if (object.jwks.length >= 0) + message.jwks = object.jwks; return message; }; /** - * Creates a plain object from an AwsAuthorization message. Also converts values to other types if specified. + * Creates a plain object from an AttachedOidcConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static - * @param {google.cloud.gkemulticloud.v1.AwsAuthorization} message AwsAuthorization + * @param {google.cloud.gkemulticloud.v1.AttachedOidcConfig} message AttachedOidcConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsAuthorization.toObject = function toObject(message, options) { + AttachedOidcConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.adminUsers = []; - if (message.adminUsers && message.adminUsers.length) { - object.adminUsers = []; - for (var j = 0; j < message.adminUsers.length; ++j) - object.adminUsers[j] = $root.google.cloud.gkemulticloud.v1.AwsClusterUser.toObject(message.adminUsers[j], options); + if (options.defaults) { + object.issuerUrl = ""; + if (options.bytes === String) + object.jwks = ""; + else { + object.jwks = []; + if (options.bytes !== Array) + object.jwks = $util.newBuffer(object.jwks); + } } + if (message.issuerUrl != null && message.hasOwnProperty("issuerUrl")) + object.issuerUrl = message.issuerUrl; + if (message.jwks != null && message.hasOwnProperty("jwks")) + object.jwks = options.bytes === String ? $util.base64.encode(message.jwks, 0, message.jwks.length) : options.bytes === Array ? Array.prototype.slice.call(message.jwks) : message.jwks; return object; }; /** - * Converts this AwsAuthorization to JSON. + * Converts this AttachedOidcConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @instance * @returns {Object.} JSON object */ - AwsAuthorization.prototype.toJSON = function toJSON() { + AttachedOidcConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsAuthorization + * Gets the default type url for AttachedOidcConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization + * @memberof google.cloud.gkemulticloud.v1.AttachedOidcConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttachedOidcConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsAuthorization"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AttachedOidcConfig"; }; - return AwsAuthorization; + return AttachedOidcConfig; })(); - v1.AwsClusterUser = (function() { + v1.AttachedServerConfig = (function() { /** - * Properties of an AwsClusterUser. + * Properties of an AttachedServerConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsClusterUser - * @property {string|null} [username] AwsClusterUser username + * @interface IAttachedServerConfig + * @property {string|null} [name] AttachedServerConfig name + * @property {Array.|null} [validVersions] AttachedServerConfig validVersions */ /** - * Constructs a new AwsClusterUser. + * Constructs a new AttachedServerConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsClusterUser. - * @implements IAwsClusterUser + * @classdesc Represents an AttachedServerConfig. + * @implements IAttachedServerConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsClusterUser=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAttachedServerConfig=} [properties] Properties to set */ - function AwsClusterUser(properties) { + function AttachedServerConfig(properties) { + this.validVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1894,75 +1563,92 @@ } /** - * AwsClusterUser username. - * @member {string} username - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * AttachedServerConfig name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @instance */ - AwsClusterUser.prototype.username = ""; + AttachedServerConfig.prototype.name = ""; /** - * Creates a new AwsClusterUser instance using the specified properties. + * AttachedServerConfig validVersions. + * @member {Array.} validVersions + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig + * @instance + */ + AttachedServerConfig.prototype.validVersions = $util.emptyArray; + + /** + * Creates a new AttachedServerConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsClusterUser=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsClusterUser} AwsClusterUser instance + * @param {google.cloud.gkemulticloud.v1.IAttachedServerConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AttachedServerConfig} AttachedServerConfig instance */ - AwsClusterUser.create = function create(properties) { - return new AwsClusterUser(properties); + AttachedServerConfig.create = function create(properties) { + return new AttachedServerConfig(properties); }; /** - * Encodes the specified AwsClusterUser message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterUser.verify|verify} messages. + * Encodes the specified AttachedServerConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedServerConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsClusterUser} message AwsClusterUser message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedServerConfig} message AttachedServerConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsClusterUser.encode = function encode(message, writer) { + AttachedServerConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.validVersions != null && message.validVersions.length) + for (var i = 0; i < message.validVersions.length; ++i) + $root.google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.encode(message.validVersions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AwsClusterUser message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterUser.verify|verify} messages. + * Encodes the specified AttachedServerConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedServerConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsClusterUser} message AwsClusterUser message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedServerConfig} message AttachedServerConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsClusterUser.encodeDelimited = function encodeDelimited(message, writer) { + AttachedServerConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsClusterUser message from the specified reader or buffer. + * Decodes an AttachedServerConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsClusterUser} AwsClusterUser + * @returns {google.cloud.gkemulticloud.v1.AttachedServerConfig} AttachedServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsClusterUser.decode = function decode(reader, length) { + AttachedServerConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsClusterUser(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AttachedServerConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.username = reader.string(); + message.name = reader.string(); + break; + } + case 2: { + if (!(message.validVersions && message.validVersions.length)) + message.validVersions = []; + message.validVersions.push($root.google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.decode(reader, reader.uint32())); break; } default: @@ -1974,122 +1660,148 @@ }; /** - * Decodes an AwsClusterUser message from the specified reader or buffer, length delimited. + * Decodes an AttachedServerConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsClusterUser} AwsClusterUser + * @returns {google.cloud.gkemulticloud.v1.AttachedServerConfig} AttachedServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsClusterUser.decodeDelimited = function decodeDelimited(reader) { + AttachedServerConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsClusterUser message. + * Verifies an AttachedServerConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsClusterUser.verify = function verify(message) { + AttachedServerConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.validVersions != null && message.hasOwnProperty("validVersions")) { + if (!Array.isArray(message.validVersions)) + return "validVersions: array expected"; + for (var i = 0; i < message.validVersions.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.verify(message.validVersions[i]); + if (error) + return "validVersions." + error; + } + } return null; }; /** - * Creates an AwsClusterUser message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedServerConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsClusterUser} AwsClusterUser + * @returns {google.cloud.gkemulticloud.v1.AttachedServerConfig} AttachedServerConfig */ - AwsClusterUser.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsClusterUser) + AttachedServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AttachedServerConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsClusterUser(); - if (object.username != null) - message.username = String(object.username); + var message = new $root.google.cloud.gkemulticloud.v1.AttachedServerConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.validVersions) { + if (!Array.isArray(object.validVersions)) + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedServerConfig.validVersions: array expected"); + message.validVersions = []; + for (var i = 0; i < object.validVersions.length; ++i) { + if (typeof object.validVersions[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AttachedServerConfig.validVersions: object expected"); + message.validVersions[i] = $root.google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.fromObject(object.validVersions[i]); + } + } return message; }; /** - * Creates a plain object from an AwsClusterUser message. Also converts values to other types if specified. + * Creates a plain object from an AttachedServerConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.AwsClusterUser} message AwsClusterUser + * @param {google.cloud.gkemulticloud.v1.AttachedServerConfig} message AttachedServerConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsClusterUser.toObject = function toObject(message, options) { + AttachedServerConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.validVersions = []; if (options.defaults) - object.username = ""; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validVersions && message.validVersions.length) { + object.validVersions = []; + for (var j = 0; j < message.validVersions.length; ++j) + object.validVersions[j] = $root.google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.toObject(message.validVersions[j], options); + } return object; }; /** - * Converts this AwsClusterUser to JSON. + * Converts this AttachedServerConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @instance * @returns {Object.} JSON object */ - AwsClusterUser.prototype.toJSON = function toJSON() { + AttachedServerConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsClusterUser + * Gets the default type url for AttachedServerConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser + * @memberof google.cloud.gkemulticloud.v1.AttachedServerConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsClusterUser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttachedServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsClusterUser"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AttachedServerConfig"; }; - return AwsClusterUser; + return AttachedServerConfig; })(); - v1.AwsDatabaseEncryption = (function() { + v1.AttachedPlatformVersionInfo = (function() { /** - * Properties of an AwsDatabaseEncryption. + * Properties of an AttachedPlatformVersionInfo. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsDatabaseEncryption - * @property {string|null} [kmsKeyArn] AwsDatabaseEncryption kmsKeyArn + * @interface IAttachedPlatformVersionInfo + * @property {string|null} [version] AttachedPlatformVersionInfo version */ /** - * Constructs a new AwsDatabaseEncryption. + * Constructs a new AttachedPlatformVersionInfo. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsDatabaseEncryption. - * @implements IAwsDatabaseEncryption + * @classdesc Represents an AttachedPlatformVersionInfo. + * @implements IAttachedPlatformVersionInfo * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo=} [properties] Properties to set */ - function AwsDatabaseEncryption(properties) { + function AttachedPlatformVersionInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2097,75 +1809,75 @@ } /** - * AwsDatabaseEncryption kmsKeyArn. - * @member {string} kmsKeyArn - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * AttachedPlatformVersionInfo version. + * @member {string} version + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @instance */ - AwsDatabaseEncryption.prototype.kmsKeyArn = ""; + AttachedPlatformVersionInfo.prototype.version = ""; /** - * Creates a new AwsDatabaseEncryption instance using the specified properties. + * Creates a new AttachedPlatformVersionInfo instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static - * @param {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} AwsDatabaseEncryption instance + * @param {google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo} AttachedPlatformVersionInfo instance */ - AwsDatabaseEncryption.create = function create(properties) { - return new AwsDatabaseEncryption(properties); + AttachedPlatformVersionInfo.create = function create(properties) { + return new AttachedPlatformVersionInfo(properties); }; /** - * Encodes the specified AwsDatabaseEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify|verify} messages. + * Encodes the specified AttachedPlatformVersionInfo message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static - * @param {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption} message AwsDatabaseEncryption message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo} message AttachedPlatformVersionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsDatabaseEncryption.encode = function encode(message, writer) { + AttachedPlatformVersionInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kmsKeyArn != null && Object.hasOwnProperty.call(message, "kmsKeyArn")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyArn); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); return writer; }; /** - * Encodes the specified AwsDatabaseEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify|verify} messages. + * Encodes the specified AttachedPlatformVersionInfo message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static - * @param {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption} message AwsDatabaseEncryption message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedPlatformVersionInfo} message AttachedPlatformVersionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsDatabaseEncryption.encodeDelimited = function encodeDelimited(message, writer) { + AttachedPlatformVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsDatabaseEncryption message from the specified reader or buffer. + * Decodes an AttachedPlatformVersionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} AwsDatabaseEncryption + * @returns {google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo} AttachedPlatformVersionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsDatabaseEncryption.decode = function decode(reader, length) { + AttachedPlatformVersionInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.kmsKeyArn = reader.string(); + message.version = reader.string(); break; } default: @@ -2177,125 +1889,122 @@ }; /** - * Decodes an AwsDatabaseEncryption message from the specified reader or buffer, length delimited. + * Decodes an AttachedPlatformVersionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} AwsDatabaseEncryption + * @returns {google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo} AttachedPlatformVersionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsDatabaseEncryption.decodeDelimited = function decodeDelimited(reader) { + AttachedPlatformVersionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsDatabaseEncryption message. + * Verifies an AttachedPlatformVersionInfo message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsDatabaseEncryption.verify = function verify(message) { + AttachedPlatformVersionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) - if (!$util.isString(message.kmsKeyArn)) - return "kmsKeyArn: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates an AwsDatabaseEncryption message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedPlatformVersionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} AwsDatabaseEncryption + * @returns {google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo} AttachedPlatformVersionInfo */ - AwsDatabaseEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) + AttachedPlatformVersionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption(); - if (object.kmsKeyArn != null) - message.kmsKeyArn = String(object.kmsKeyArn); + var message = new $root.google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo(); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from an AwsDatabaseEncryption message. Also converts values to other types if specified. + * Creates a plain object from an AttachedPlatformVersionInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static - * @param {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} message AwsDatabaseEncryption + * @param {google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo} message AttachedPlatformVersionInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsDatabaseEncryption.toObject = function toObject(message, options) { + AttachedPlatformVersionInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.kmsKeyArn = ""; - if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) - object.kmsKeyArn = message.kmsKeyArn; + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this AwsDatabaseEncryption to JSON. + * Converts this AttachedPlatformVersionInfo to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @instance * @returns {Object.} JSON object */ - AwsDatabaseEncryption.prototype.toJSON = function toJSON() { + AttachedPlatformVersionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsDatabaseEncryption + * Gets the default type url for AttachedPlatformVersionInfo * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsDatabaseEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttachedPlatformVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsDatabaseEncryption"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo"; }; - return AwsDatabaseEncryption; + return AttachedPlatformVersionInfo; })(); - v1.AwsVolumeTemplate = (function() { + v1.AttachedClusterError = (function() { /** - * Properties of an AwsVolumeTemplate. + * Properties of an AttachedClusterError. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsVolumeTemplate - * @property {number|null} [sizeGib] AwsVolumeTemplate sizeGib - * @property {google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType|null} [volumeType] AwsVolumeTemplate volumeType - * @property {number|null} [iops] AwsVolumeTemplate iops - * @property {string|null} [kmsKeyArn] AwsVolumeTemplate kmsKeyArn + * @interface IAttachedClusterError + * @property {string|null} [message] AttachedClusterError message */ /** - * Constructs a new AwsVolumeTemplate. + * Constructs a new AttachedClusterError. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsVolumeTemplate. - * @implements IAwsVolumeTemplate + * @classdesc Represents an AttachedClusterError. + * @implements IAttachedClusterError * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAttachedClusterError=} [properties] Properties to set */ - function AwsVolumeTemplate(properties) { + function AttachedClusterError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2303,117 +2012,75 @@ } /** - * AwsVolumeTemplate sizeGib. - * @member {number} sizeGib - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate - * @instance - */ - AwsVolumeTemplate.prototype.sizeGib = 0; - - /** - * AwsVolumeTemplate volumeType. - * @member {google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType} volumeType - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate - * @instance - */ - AwsVolumeTemplate.prototype.volumeType = 0; - - /** - * AwsVolumeTemplate iops. - * @member {number} iops - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate - * @instance - */ - AwsVolumeTemplate.prototype.iops = 0; - - /** - * AwsVolumeTemplate kmsKeyArn. - * @member {string} kmsKeyArn - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * AttachedClusterError message. + * @member {string} message + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @instance */ - AwsVolumeTemplate.prototype.kmsKeyArn = ""; + AttachedClusterError.prototype.message = ""; /** - * Creates a new AwsVolumeTemplate instance using the specified properties. + * Creates a new AttachedClusterError instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static - * @param {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} AwsVolumeTemplate instance + * @param {google.cloud.gkemulticloud.v1.IAttachedClusterError=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AttachedClusterError} AttachedClusterError instance */ - AwsVolumeTemplate.create = function create(properties) { - return new AwsVolumeTemplate(properties); + AttachedClusterError.create = function create(properties) { + return new AttachedClusterError(properties); }; /** - * Encodes the specified AwsVolumeTemplate message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify|verify} messages. + * Encodes the specified AttachedClusterError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClusterError.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static - * @param {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate} message AwsVolumeTemplate message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedClusterError} message AttachedClusterError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsVolumeTemplate.encode = function encode(message, writer) { + AttachedClusterError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sizeGib != null && Object.hasOwnProperty.call(message, "sizeGib")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sizeGib); - if (message.volumeType != null && Object.hasOwnProperty.call(message, "volumeType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.volumeType); - if (message.iops != null && Object.hasOwnProperty.call(message, "iops")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.iops); - if (message.kmsKeyArn != null && Object.hasOwnProperty.call(message, "kmsKeyArn")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyArn); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); return writer; }; /** - * Encodes the specified AwsVolumeTemplate message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify|verify} messages. + * Encodes the specified AttachedClusterError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AttachedClusterError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static - * @param {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate} message AwsVolumeTemplate message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAttachedClusterError} message AttachedClusterError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsVolumeTemplate.encodeDelimited = function encodeDelimited(message, writer) { + AttachedClusterError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsVolumeTemplate message from the specified reader or buffer. + * Decodes an AttachedClusterError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} AwsVolumeTemplate + * @returns {google.cloud.gkemulticloud.v1.AttachedClusterError} AttachedClusterError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsVolumeTemplate.decode = function decode(reader, length) { + AttachedClusterError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AttachedClusterError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.sizeGib = reader.int32(); - break; - } - case 2: { - message.volumeType = reader.int32(); - break; - } - case 3: { - message.iops = reader.int32(); - break; - } - case 4: { - message.kmsKeyArn = reader.string(); + message.message = reader.string(); break; } default: @@ -2425,191 +2092,124 @@ }; /** - * Decodes an AwsVolumeTemplate message from the specified reader or buffer, length delimited. + * Decodes an AttachedClusterError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} AwsVolumeTemplate + * @returns {google.cloud.gkemulticloud.v1.AttachedClusterError} AttachedClusterError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsVolumeTemplate.decodeDelimited = function decodeDelimited(reader) { + AttachedClusterError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsVolumeTemplate message. + * Verifies an AttachedClusterError message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsVolumeTemplate.verify = function verify(message) { + AttachedClusterError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) - if (!$util.isInteger(message.sizeGib)) - return "sizeGib: integer expected"; - if (message.volumeType != null && message.hasOwnProperty("volumeType")) - switch (message.volumeType) { - default: - return "volumeType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.iops != null && message.hasOwnProperty("iops")) - if (!$util.isInteger(message.iops)) - return "iops: integer expected"; - if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) - if (!$util.isString(message.kmsKeyArn)) - return "kmsKeyArn: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; return null; }; /** - * Creates an AwsVolumeTemplate message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedClusterError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} AwsVolumeTemplate + * @returns {google.cloud.gkemulticloud.v1.AttachedClusterError} AttachedClusterError */ - AwsVolumeTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate) + AttachedClusterError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AttachedClusterError) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate(); - if (object.sizeGib != null) - message.sizeGib = object.sizeGib | 0; - switch (object.volumeType) { - default: - if (typeof object.volumeType === "number") { - message.volumeType = object.volumeType; - break; - } - break; - case "VOLUME_TYPE_UNSPECIFIED": - case 0: - message.volumeType = 0; - break; - case "GP2": - case 1: - message.volumeType = 1; - break; - case "GP3": - case 2: - message.volumeType = 2; - break; - } - if (object.iops != null) - message.iops = object.iops | 0; - if (object.kmsKeyArn != null) - message.kmsKeyArn = String(object.kmsKeyArn); + var message = new $root.google.cloud.gkemulticloud.v1.AttachedClusterError(); + if (object.message != null) + message.message = String(object.message); return message; }; /** - * Creates a plain object from an AwsVolumeTemplate message. Also converts values to other types if specified. + * Creates a plain object from an AttachedClusterError message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static - * @param {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} message AwsVolumeTemplate + * @param {google.cloud.gkemulticloud.v1.AttachedClusterError} message AttachedClusterError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsVolumeTemplate.toObject = function toObject(message, options) { + AttachedClusterError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sizeGib = 0; - object.volumeType = options.enums === String ? "VOLUME_TYPE_UNSPECIFIED" : 0; - object.iops = 0; - object.kmsKeyArn = ""; - } - if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) - object.sizeGib = message.sizeGib; - if (message.volumeType != null && message.hasOwnProperty("volumeType")) - object.volumeType = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType[message.volumeType] === undefined ? message.volumeType : $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType[message.volumeType] : message.volumeType; - if (message.iops != null && message.hasOwnProperty("iops")) - object.iops = message.iops; - if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) - object.kmsKeyArn = message.kmsKeyArn; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; return object; }; /** - * Converts this AwsVolumeTemplate to JSON. + * Converts this AttachedClusterError to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @instance * @returns {Object.} JSON object */ - AwsVolumeTemplate.prototype.toJSON = function toJSON() { + AttachedClusterError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsVolumeTemplate + * Gets the default type url for AttachedClusterError * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @memberof google.cloud.gkemulticloud.v1.AttachedClusterError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsVolumeTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttachedClusterError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsVolumeTemplate"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AttachedClusterError"; }; - /** - * VolumeType enum. - * @name google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType - * @enum {number} - * @property {number} VOLUME_TYPE_UNSPECIFIED=0 VOLUME_TYPE_UNSPECIFIED value - * @property {number} GP2=1 GP2 value - * @property {number} GP3=2 GP3 value - */ - AwsVolumeTemplate.VolumeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VOLUME_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GP2"] = 1; - values[valuesById[2] = "GP3"] = 2; - return values; - })(); - - return AwsVolumeTemplate; + return AttachedClusterError; })(); - v1.AwsClusterNetworking = (function() { + v1.WorkloadIdentityConfig = (function() { /** - * Properties of an AwsClusterNetworking. + * Properties of a WorkloadIdentityConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsClusterNetworking - * @property {string|null} [vpcId] AwsClusterNetworking vpcId - * @property {Array.|null} [podAddressCidrBlocks] AwsClusterNetworking podAddressCidrBlocks - * @property {Array.|null} [serviceAddressCidrBlocks] AwsClusterNetworking serviceAddressCidrBlocks + * @interface IWorkloadIdentityConfig + * @property {string|null} [issuerUri] WorkloadIdentityConfig issuerUri + * @property {string|null} [workloadPool] WorkloadIdentityConfig workloadPool + * @property {string|null} [identityProvider] WorkloadIdentityConfig identityProvider */ /** - * Constructs a new AwsClusterNetworking. + * Constructs a new WorkloadIdentityConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsClusterNetworking. - * @implements IAwsClusterNetworking + * @classdesc Represents a WorkloadIdentityConfig. + * @implements IWorkloadIdentityConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsClusterNetworking=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig=} [properties] Properties to set */ - function AwsClusterNetworking(properties) { - this.podAddressCidrBlocks = []; - this.serviceAddressCidrBlocks = []; + function WorkloadIdentityConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2617,109 +2217,103 @@ } /** - * AwsClusterNetworking vpcId. - * @member {string} vpcId - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * WorkloadIdentityConfig issuerUri. + * @member {string} issuerUri + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @instance */ - AwsClusterNetworking.prototype.vpcId = ""; + WorkloadIdentityConfig.prototype.issuerUri = ""; /** - * AwsClusterNetworking podAddressCidrBlocks. - * @member {Array.} podAddressCidrBlocks - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * WorkloadIdentityConfig workloadPool. + * @member {string} workloadPool + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @instance */ - AwsClusterNetworking.prototype.podAddressCidrBlocks = $util.emptyArray; + WorkloadIdentityConfig.prototype.workloadPool = ""; /** - * AwsClusterNetworking serviceAddressCidrBlocks. - * @member {Array.} serviceAddressCidrBlocks - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * WorkloadIdentityConfig identityProvider. + * @member {string} identityProvider + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @instance */ - AwsClusterNetworking.prototype.serviceAddressCidrBlocks = $util.emptyArray; + WorkloadIdentityConfig.prototype.identityProvider = ""; /** - * Creates a new AwsClusterNetworking instance using the specified properties. + * Creates a new WorkloadIdentityConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsClusterNetworking=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsClusterNetworking} AwsClusterNetworking instance + * @param {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} WorkloadIdentityConfig instance */ - AwsClusterNetworking.create = function create(properties) { - return new AwsClusterNetworking(properties); + WorkloadIdentityConfig.create = function create(properties) { + return new WorkloadIdentityConfig(properties); }; /** - * Encodes the specified AwsClusterNetworking message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify|verify} messages. + * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsClusterNetworking} message AwsClusterNetworking message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsClusterNetworking.encode = function encode(message, writer) { + WorkloadIdentityConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vpcId != null && Object.hasOwnProperty.call(message, "vpcId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpcId); - if (message.podAddressCidrBlocks != null && message.podAddressCidrBlocks.length) - for (var i = 0; i < message.podAddressCidrBlocks.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.podAddressCidrBlocks[i]); - if (message.serviceAddressCidrBlocks != null && message.serviceAddressCidrBlocks.length) - for (var i = 0; i < message.serviceAddressCidrBlocks.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAddressCidrBlocks[i]); + if (message.issuerUri != null && Object.hasOwnProperty.call(message, "issuerUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuerUri); + if (message.workloadPool != null && Object.hasOwnProperty.call(message, "workloadPool")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.workloadPool); + if (message.identityProvider != null && Object.hasOwnProperty.call(message, "identityProvider")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identityProvider); return writer; }; /** - * Encodes the specified AwsClusterNetworking message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify|verify} messages. + * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsClusterNetworking} message AwsClusterNetworking message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsClusterNetworking.encodeDelimited = function encodeDelimited(message, writer) { + WorkloadIdentityConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsClusterNetworking message from the specified reader or buffer. + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsClusterNetworking} AwsClusterNetworking + * @returns {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} WorkloadIdentityConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsClusterNetworking.decode = function decode(reader, length) { + WorkloadIdentityConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.vpcId = reader.string(); + message.issuerUri = reader.string(); break; } case 2: { - if (!(message.podAddressCidrBlocks && message.podAddressCidrBlocks.length)) - message.podAddressCidrBlocks = []; - message.podAddressCidrBlocks.push(reader.string()); + message.workloadPool = reader.string(); break; } case 3: { - if (!(message.serviceAddressCidrBlocks && message.serviceAddressCidrBlocks.length)) - message.serviceAddressCidrBlocks = []; - message.serviceAddressCidrBlocks.push(reader.string()); + message.identityProvider = reader.string(); break; } default: @@ -2731,177 +2325,139 @@ }; /** - * Decodes an AwsClusterNetworking message from the specified reader or buffer, length delimited. + * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsClusterNetworking} AwsClusterNetworking + * @returns {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} WorkloadIdentityConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsClusterNetworking.decodeDelimited = function decodeDelimited(reader) { + WorkloadIdentityConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsClusterNetworking message. + * Verifies a WorkloadIdentityConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsClusterNetworking.verify = function verify(message) { + WorkloadIdentityConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vpcId != null && message.hasOwnProperty("vpcId")) - if (!$util.isString(message.vpcId)) - return "vpcId: string expected"; - if (message.podAddressCidrBlocks != null && message.hasOwnProperty("podAddressCidrBlocks")) { - if (!Array.isArray(message.podAddressCidrBlocks)) - return "podAddressCidrBlocks: array expected"; - for (var i = 0; i < message.podAddressCidrBlocks.length; ++i) - if (!$util.isString(message.podAddressCidrBlocks[i])) - return "podAddressCidrBlocks: string[] expected"; - } - if (message.serviceAddressCidrBlocks != null && message.hasOwnProperty("serviceAddressCidrBlocks")) { - if (!Array.isArray(message.serviceAddressCidrBlocks)) - return "serviceAddressCidrBlocks: array expected"; - for (var i = 0; i < message.serviceAddressCidrBlocks.length; ++i) - if (!$util.isString(message.serviceAddressCidrBlocks[i])) - return "serviceAddressCidrBlocks: string[] expected"; - } + if (message.issuerUri != null && message.hasOwnProperty("issuerUri")) + if (!$util.isString(message.issuerUri)) + return "issuerUri: string expected"; + if (message.workloadPool != null && message.hasOwnProperty("workloadPool")) + if (!$util.isString(message.workloadPool)) + return "workloadPool: string expected"; + if (message.identityProvider != null && message.hasOwnProperty("identityProvider")) + if (!$util.isString(message.identityProvider)) + return "identityProvider: string expected"; return null; }; /** - * Creates an AwsClusterNetworking message from a plain object. Also converts values to their respective internal types. + * Creates a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsClusterNetworking} AwsClusterNetworking + * @returns {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} WorkloadIdentityConfig */ - AwsClusterNetworking.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking) + WorkloadIdentityConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking(); - if (object.vpcId != null) - message.vpcId = String(object.vpcId); - if (object.podAddressCidrBlocks) { - if (!Array.isArray(object.podAddressCidrBlocks)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsClusterNetworking.podAddressCidrBlocks: array expected"); - message.podAddressCidrBlocks = []; - for (var i = 0; i < object.podAddressCidrBlocks.length; ++i) - message.podAddressCidrBlocks[i] = String(object.podAddressCidrBlocks[i]); - } - if (object.serviceAddressCidrBlocks) { - if (!Array.isArray(object.serviceAddressCidrBlocks)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsClusterNetworking.serviceAddressCidrBlocks: array expected"); - message.serviceAddressCidrBlocks = []; - for (var i = 0; i < object.serviceAddressCidrBlocks.length; ++i) - message.serviceAddressCidrBlocks[i] = String(object.serviceAddressCidrBlocks[i]); - } + var message = new $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig(); + if (object.issuerUri != null) + message.issuerUri = String(object.issuerUri); + if (object.workloadPool != null) + message.workloadPool = String(object.workloadPool); + if (object.identityProvider != null) + message.identityProvider = String(object.identityProvider); return message; }; /** - * Creates a plain object from an AwsClusterNetworking message. Also converts values to other types if specified. + * Creates a plain object from a WorkloadIdentityConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static - * @param {google.cloud.gkemulticloud.v1.AwsClusterNetworking} message AwsClusterNetworking + * @param {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} message WorkloadIdentityConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsClusterNetworking.toObject = function toObject(message, options) { + WorkloadIdentityConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.podAddressCidrBlocks = []; - object.serviceAddressCidrBlocks = []; - } - if (options.defaults) - object.vpcId = ""; - if (message.vpcId != null && message.hasOwnProperty("vpcId")) - object.vpcId = message.vpcId; - if (message.podAddressCidrBlocks && message.podAddressCidrBlocks.length) { - object.podAddressCidrBlocks = []; - for (var j = 0; j < message.podAddressCidrBlocks.length; ++j) - object.podAddressCidrBlocks[j] = message.podAddressCidrBlocks[j]; - } - if (message.serviceAddressCidrBlocks && message.serviceAddressCidrBlocks.length) { - object.serviceAddressCidrBlocks = []; - for (var j = 0; j < message.serviceAddressCidrBlocks.length; ++j) - object.serviceAddressCidrBlocks[j] = message.serviceAddressCidrBlocks[j]; + if (options.defaults) { + object.issuerUri = ""; + object.workloadPool = ""; + object.identityProvider = ""; } + if (message.issuerUri != null && message.hasOwnProperty("issuerUri")) + object.issuerUri = message.issuerUri; + if (message.workloadPool != null && message.hasOwnProperty("workloadPool")) + object.workloadPool = message.workloadPool; + if (message.identityProvider != null && message.hasOwnProperty("identityProvider")) + object.identityProvider = message.identityProvider; return object; }; /** - * Converts this AwsClusterNetworking to JSON. + * Converts this WorkloadIdentityConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @instance * @returns {Object.} JSON object */ - AwsClusterNetworking.prototype.toJSON = function toJSON() { + WorkloadIdentityConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsClusterNetworking + * Gets the default type url for WorkloadIdentityConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsClusterNetworking.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + WorkloadIdentityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsClusterNetworking"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.WorkloadIdentityConfig"; }; - return AwsClusterNetworking; + return WorkloadIdentityConfig; })(); - v1.AwsNodePool = (function() { + v1.MaxPodsConstraint = (function() { /** - * Properties of an AwsNodePool. + * Properties of a MaxPodsConstraint. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsNodePool - * @property {string|null} [name] AwsNodePool name - * @property {string|null} [version] AwsNodePool version - * @property {google.cloud.gkemulticloud.v1.IAwsNodeConfig|null} [config] AwsNodePool config - * @property {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling|null} [autoscaling] AwsNodePool autoscaling - * @property {string|null} [subnetId] AwsNodePool subnetId - * @property {google.cloud.gkemulticloud.v1.AwsNodePool.State|null} [state] AwsNodePool state - * @property {string|null} [uid] AwsNodePool uid - * @property {boolean|null} [reconciling] AwsNodePool reconciling - * @property {google.protobuf.ITimestamp|null} [createTime] AwsNodePool createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] AwsNodePool updateTime - * @property {string|null} [etag] AwsNodePool etag - * @property {Object.|null} [annotations] AwsNodePool annotations - * @property {google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null} [maxPodsConstraint] AwsNodePool maxPodsConstraint + * @interface IMaxPodsConstraint + * @property {number|Long|null} [maxPodsPerNode] MaxPodsConstraint maxPodsPerNode */ /** - * Constructs a new AwsNodePool. + * Constructs a new MaxPodsConstraint. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsNodePool. - * @implements IAwsNodePool + * @classdesc Represents a MaxPodsConstraint. + * @implements IMaxPodsConstraint * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsNodePool=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IMaxPodsConstraint=} [properties] Properties to set */ - function AwsNodePool(properties) { - this.annotations = {}; + function MaxPodsConstraint(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2909,263 +2465,382 @@ } /** - * AwsNodePool name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * MaxPodsConstraint maxPodsPerNode. + * @member {number|Long} maxPodsPerNode + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint * @instance */ - AwsNodePool.prototype.name = ""; + MaxPodsConstraint.prototype.maxPodsPerNode = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * AwsNodePool version. - * @member {string} version - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool - * @instance + * Creates a new MaxPodsConstraint instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {google.cloud.gkemulticloud.v1.IMaxPodsConstraint=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.MaxPodsConstraint} MaxPodsConstraint instance */ - AwsNodePool.prototype.version = ""; + MaxPodsConstraint.create = function create(properties) { + return new MaxPodsConstraint(properties); + }; /** - * AwsNodePool config. - * @member {google.cloud.gkemulticloud.v1.IAwsNodeConfig|null|undefined} config - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool - * @instance + * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {google.cloud.gkemulticloud.v1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - AwsNodePool.prototype.config = null; + MaxPodsConstraint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxPodsPerNode); + return writer; + }; /** - * AwsNodePool autoscaling. - * @member {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling|null|undefined} autoscaling - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool - * @instance + * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {google.cloud.gkemulticloud.v1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - AwsNodePool.prototype.autoscaling = null; + MaxPodsConstraint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * AwsNodePool subnetId. - * @member {string} subnetId - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool - * @instance + * Decodes a MaxPodsConstraint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.MaxPodsConstraint} MaxPodsConstraint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsNodePool.prototype.subnetId = ""; + MaxPodsConstraint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxPodsPerNode = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * AwsNodePool state. - * @member {google.cloud.gkemulticloud.v1.AwsNodePool.State} state - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool - * @instance + * Decodes a MaxPodsConstraint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.MaxPodsConstraint} MaxPodsConstraint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsNodePool.prototype.state = 0; + MaxPodsConstraint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * AwsNodePool uid. - * @member {string} uid - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool - * @instance + * Verifies a MaxPodsConstraint message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsNodePool.prototype.uid = ""; + MaxPodsConstraint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) + if (!$util.isInteger(message.maxPodsPerNode) && !(message.maxPodsPerNode && $util.isInteger(message.maxPodsPerNode.low) && $util.isInteger(message.maxPodsPerNode.high))) + return "maxPodsPerNode: integer|Long expected"; + return null; + }; /** - * AwsNodePool reconciling. - * @member {boolean} reconciling - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * Creates a MaxPodsConstraint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.MaxPodsConstraint} MaxPodsConstraint + */ + MaxPodsConstraint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint(); + if (object.maxPodsPerNode != null) + if ($util.Long) + (message.maxPodsPerNode = $util.Long.fromValue(object.maxPodsPerNode)).unsigned = false; + else if (typeof object.maxPodsPerNode === "string") + message.maxPodsPerNode = parseInt(object.maxPodsPerNode, 10); + else if (typeof object.maxPodsPerNode === "number") + message.maxPodsPerNode = object.maxPodsPerNode; + else if (typeof object.maxPodsPerNode === "object") + message.maxPodsPerNode = new $util.LongBits(object.maxPodsPerNode.low >>> 0, object.maxPodsPerNode.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a MaxPodsConstraint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {google.cloud.gkemulticloud.v1.MaxPodsConstraint} message MaxPodsConstraint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaxPodsConstraint.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.maxPodsPerNode = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxPodsPerNode = options.longs === String ? "0" : 0; + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) + if (typeof message.maxPodsPerNode === "number") + object.maxPodsPerNode = options.longs === String ? String(message.maxPodsPerNode) : message.maxPodsPerNode; + else + object.maxPodsPerNode = options.longs === String ? $util.Long.prototype.toString.call(message.maxPodsPerNode) : options.longs === Number ? new $util.LongBits(message.maxPodsPerNode.low >>> 0, message.maxPodsPerNode.high >>> 0).toNumber() : message.maxPodsPerNode; + return object; + }; + + /** + * Converts this MaxPodsConstraint to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint * @instance + * @returns {Object.} JSON object */ - AwsNodePool.prototype.reconciling = false; + MaxPodsConstraint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * AwsNodePool createTime. + * Gets the default type url for MaxPodsConstraint + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaxPodsConstraint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.MaxPodsConstraint"; + }; + + return MaxPodsConstraint; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.gkemulticloud.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} [statusDetail] OperationMetadata statusDetail + * @property {string|null} [errorDetail] OperationMetadata errorDetail + * @property {string|null} [verb] OperationMetadata verb + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.gkemulticloud.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @instance */ - AwsNodePool.prototype.createTime = null; + OperationMetadata.prototype.createTime = null; /** - * AwsNodePool updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @instance */ - AwsNodePool.prototype.updateTime = null; + OperationMetadata.prototype.endTime = null; /** - * AwsNodePool etag. - * @member {string} etag - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @instance */ - AwsNodePool.prototype.etag = ""; + OperationMetadata.prototype.target = ""; /** - * AwsNodePool annotations. - * @member {Object.} annotations - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * OperationMetadata statusDetail. + * @member {string} statusDetail + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @instance */ - AwsNodePool.prototype.annotations = $util.emptyObject; + OperationMetadata.prototype.statusDetail = ""; /** - * AwsNodePool maxPodsConstraint. - * @member {google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null|undefined} maxPodsConstraint - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * OperationMetadata errorDetail. + * @member {string} errorDetail + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @instance */ - AwsNodePool.prototype.maxPodsConstraint = null; + OperationMetadata.prototype.errorDetail = ""; /** - * Creates a new AwsNodePool instance using the specified properties. + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodePool=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsNodePool} AwsNodePool instance + * @param {google.cloud.gkemulticloud.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.OperationMetadata} OperationMetadata instance */ - AwsNodePool.create = function create(properties) { - return new AwsNodePool(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified AwsNodePool message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePool.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.gkemulticloud.v1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodePool} message AwsNodePool message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsNodePool.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { 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.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); - if (message.subnetId != null && Object.hasOwnProperty.call(message, "subnetId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.subnetId); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.state); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.uid); - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.reconciling); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.etag); - 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 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) - $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.maxPodsConstraint != null && Object.hasOwnProperty.call(message, "maxPodsConstraint")) - $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.encode(message.maxPodsConstraint, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.encode(message.config, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + $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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.statusDetail); + if (message.errorDetail != null && Object.hasOwnProperty.call(message, "errorDetail")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.errorDetail); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.verb); return writer; }; /** - * Encodes the specified AwsNodePool message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePool.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodePool} message AwsNodePool message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsNodePool.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsNodePool message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.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.gkemulticloud.v1.AwsNodePool} AwsNodePool + * @returns {google.cloud.gkemulticloud.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsNodePool.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.gkemulticloud.v1.AwsNodePool(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 3: { - message.version = reader.string(); + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 28: { - message.config = $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.decode(reader, reader.uint32()); + case 3: { + message.target = reader.string(); break; } - case 25: { - message.autoscaling = $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.decode(reader, reader.uint32()); + case 4: { + message.statusDetail = reader.string(); break; } - case 6: { - message.subnetId = reader.string(); + case 5: { + message.errorDetail = reader.string(); break; } - case 16: { - message.state = reader.int32(); + case 7: { + message.verb = reader.string(); break; } - case 17: { - message.uid = reader.string(); - break; - } - case 18: { - message.reconciling = reader.bool(); - break; - } - case 19: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 20: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 21: { - message.etag = reader.string(); - break; - } - case 22: { - 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 27: { - message.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.decode(reader, reader.uint32()); + case 6: { + message.requestedCancellation = reader.bool(); break; } default: @@ -3177,342 +2852,183 @@ }; /** - * Decodes an AwsNodePool 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.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsNodePool} AwsNodePool + * @returns {google.cloud.gkemulticloud.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsNodePool.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsNodePool message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsNodePool.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (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.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify(message.autoscaling); - if (error) - return "autoscaling." + error; - } - if (message.subnetId != null && message.hasOwnProperty("subnetId")) - if (!$util.isString(message.subnetId)) - return "subnetId: 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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - if (typeof message.reconciling !== "boolean") - return "reconciling: 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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: 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.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) { - var error = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify(message.maxPodsConstraint); + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); if (error) - return "maxPodsConstraint." + error; + return "endTime." + error; } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (!$util.isString(message.statusDetail)) + return "statusDetail: string expected"; + if (message.errorDetail != null && message.hasOwnProperty("errorDetail")) + if (!$util.isString(message.errorDetail)) + return "errorDetail: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; return null; }; /** - * Creates an AwsNodePool 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.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsNodePool} AwsNodePool + * @returns {google.cloud.gkemulticloud.v1.OperationMetadata} OperationMetadata */ - AwsNodePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsNodePool) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.OperationMetadata) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsNodePool(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - message.version = String(object.version); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.config: object expected"); - message.config = $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.fromObject(object.config); - } - if (object.autoscaling != null) { - if (typeof object.autoscaling !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.autoscaling: object expected"); - message.autoscaling = $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.fromObject(object.autoscaling); - } - if (object.subnetId != null) - message.subnetId = String(object.subnetId); - 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 "PROVISIONING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "RECONCILING": - case 3: - message.state = 3; - break; - case "STOPPING": - case 4: - message.state = 4; - break; - case "ERROR": - case 5: - message.state = 5; - break; - case "DEGRADED": - case 6: - message.state = 6; - break; - } - if (object.uid != null) - message.uid = String(object.uid); - if (object.reconciling != null) - message.reconciling = Boolean(object.reconciling); + var message = new $root.google.cloud.gkemulticloud.v1.OperationMetadata(); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.createTime: object expected"); + throw TypeError(".google.cloud.gkemulticloud.v1.OperationMetadata.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.gkemulticloud.v1.AwsNodePool.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.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.maxPodsConstraint != null) { - if (typeof object.maxPodsConstraint !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.maxPodsConstraint: object expected"); - message.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.fromObject(object.maxPodsConstraint); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.gkemulticloud.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.statusDetail != null) + message.statusDetail = String(object.statusDetail); + if (object.errorDetail != null) + message.errorDetail = String(object.errorDetail); + if (object.verb != null) + message.verb = String(object.verb); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); return message; }; /** - * Creates a plain object from an AwsNodePool message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @static - * @param {google.cloud.gkemulticloud.v1.AwsNodePool} message AwsNodePool + * @param {google.cloud.gkemulticloud.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsNodePool.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.annotations = {}; if (options.defaults) { - object.name = ""; - object.version = ""; - object.subnetId = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.uid = ""; - object.reconciling = false; object.createTime = null; - object.updateTime = null; - object.etag = ""; - object.autoscaling = null; - object.maxPodsConstraint = null; - object.config = null; + object.endTime = null; + object.target = ""; + object.statusDetail = ""; + object.errorDetail = ""; + object.requestedCancellation = false; + object.verb = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.subnetId != null && message.hasOwnProperty("subnetId")) - object.subnetId = message.subnetId; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AwsNodePool.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AwsNodePool.State[message.state] : message.state; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - object.reconciling = message.reconciling; 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; - 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.autoscaling != null && message.hasOwnProperty("autoscaling")) - object.autoscaling = $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.toObject(message.autoscaling, options); - if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) - object.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.toObject(message.maxPodsConstraint, options); - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.toObject(message.config, 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.statusDetail != null && message.hasOwnProperty("statusDetail")) + object.statusDetail = message.statusDetail; + if (message.errorDetail != null && message.hasOwnProperty("errorDetail")) + object.errorDetail = message.errorDetail; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; return object; }; /** - * Converts this AwsNodePool to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @instance * @returns {Object.} JSON object */ - AwsNodePool.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsNodePool + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @memberof google.cloud.gkemulticloud.v1.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsNodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsNodePool"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.OperationMetadata"; }; - /** - * State enum. - * @name google.cloud.gkemulticloud.v1.AwsNodePool.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PROVISIONING=1 PROVISIONING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} RECONCILING=3 RECONCILING value - * @property {number} STOPPING=4 STOPPING value - * @property {number} ERROR=5 ERROR value - * @property {number} DEGRADED=6 DEGRADED value - */ - AwsNodePool.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROVISIONING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "RECONCILING"] = 3; - values[valuesById[4] = "STOPPING"] = 4; - values[valuesById[5] = "ERROR"] = 5; - values[valuesById[6] = "DEGRADED"] = 6; - return values; - })(); - - return AwsNodePool; + return OperationMetadata; })(); - v1.AwsNodeConfig = (function() { + v1.NodeTaint = (function() { /** - * Properties of an AwsNodeConfig. + * Properties of a NodeTaint. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsNodeConfig - * @property {string|null} [instanceType] AwsNodeConfig instanceType - * @property {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null} [rootVolume] AwsNodeConfig rootVolume - * @property {Array.|null} [taints] AwsNodeConfig taints - * @property {Object.|null} [labels] AwsNodeConfig labels - * @property {Object.|null} [tags] AwsNodeConfig tags - * @property {string|null} [iamInstanceProfile] AwsNodeConfig iamInstanceProfile - * @property {string|null} [imageType] AwsNodeConfig imageType - * @property {google.cloud.gkemulticloud.v1.IAwsSshConfig|null} [sshConfig] AwsNodeConfig sshConfig - * @property {Array.|null} [securityGroupIds] AwsNodeConfig securityGroupIds - * @property {google.cloud.gkemulticloud.v1.IAwsProxyConfig|null} [proxyConfig] AwsNodeConfig proxyConfig - * @property {google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null} [configEncryption] AwsNodeConfig configEncryption - * @property {google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null} [instancePlacement] AwsNodeConfig instancePlacement + * @interface INodeTaint + * @property {string|null} [key] NodeTaint key + * @property {string|null} [value] NodeTaint value + * @property {google.cloud.gkemulticloud.v1.NodeTaint.Effect|null} [effect] NodeTaint effect */ /** - * Constructs a new AwsNodeConfig. + * Constructs a new NodeTaint. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsNodeConfig. - * @implements IAwsNodeConfig + * @classdesc Represents a NodeTaint. + * @implements INodeTaint * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsNodeConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.INodeTaint=} [properties] Properties to set */ - function AwsNodeConfig(properties) { - this.taints = []; - this.labels = {}; - this.tags = {}; - this.securityGroupIds = []; + function NodeTaint(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3520,275 +3036,103 @@ } /** - * AwsNodeConfig instanceType. - * @member {string} instanceType - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.instanceType = ""; - - /** - * AwsNodeConfig rootVolume. - * @member {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null|undefined} rootVolume - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.rootVolume = null; - - /** - * AwsNodeConfig taints. - * @member {Array.} taints - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.taints = $util.emptyArray; - - /** - * AwsNodeConfig labels. - * @member {Object.} labels - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.labels = $util.emptyObject; - - /** - * AwsNodeConfig tags. - * @member {Object.} tags - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.tags = $util.emptyObject; - - /** - * AwsNodeConfig iamInstanceProfile. - * @member {string} iamInstanceProfile - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.iamInstanceProfile = ""; - - /** - * AwsNodeConfig imageType. - * @member {string} imageType - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.imageType = ""; - - /** - * AwsNodeConfig sshConfig. - * @member {google.cloud.gkemulticloud.v1.IAwsSshConfig|null|undefined} sshConfig - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.sshConfig = null; - - /** - * AwsNodeConfig securityGroupIds. - * @member {Array.} securityGroupIds - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig - * @instance - */ - AwsNodeConfig.prototype.securityGroupIds = $util.emptyArray; - - /** - * AwsNodeConfig proxyConfig. - * @member {google.cloud.gkemulticloud.v1.IAwsProxyConfig|null|undefined} proxyConfig - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * NodeTaint key. + * @member {string} key + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @instance */ - AwsNodeConfig.prototype.proxyConfig = null; + NodeTaint.prototype.key = ""; /** - * AwsNodeConfig configEncryption. - * @member {google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null|undefined} configEncryption - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * NodeTaint value. + * @member {string} value + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @instance */ - AwsNodeConfig.prototype.configEncryption = null; + NodeTaint.prototype.value = ""; /** - * AwsNodeConfig instancePlacement. - * @member {google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null|undefined} instancePlacement - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * NodeTaint effect. + * @member {google.cloud.gkemulticloud.v1.NodeTaint.Effect} effect + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @instance */ - AwsNodeConfig.prototype.instancePlacement = null; + NodeTaint.prototype.effect = 0; /** - * Creates a new AwsNodeConfig instance using the specified properties. + * Creates a new NodeTaint instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodeConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsNodeConfig} AwsNodeConfig instance + * @param {google.cloud.gkemulticloud.v1.INodeTaint=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.NodeTaint} NodeTaint instance */ - AwsNodeConfig.create = function create(properties) { - return new AwsNodeConfig(properties); + NodeTaint.create = function create(properties) { + return new NodeTaint(properties); }; /** - * Encodes the specified AwsNodeConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodeConfig.verify|verify} messages. + * Encodes the specified NodeTaint message. Does not implicitly {@link google.cloud.gkemulticloud.v1.NodeTaint.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodeConfig} message AwsNodeConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.INodeTaint} message NodeTaint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsNodeConfig.encode = function encode(message, writer) { + NodeTaint.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.instanceType != null && Object.hasOwnProperty.call(message, "instanceType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceType); - if (message.rootVolume != null && Object.hasOwnProperty.call(message, "rootVolume")) - $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.encode(message.rootVolume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.taints != null && message.taints.length) - for (var i = 0; i < message.taints.length; ++i) - $root.google.cloud.gkemulticloud.v1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - for (var keys = Object.keys(message.tags), 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.tags[keys[i]]).ldelim(); - if (message.iamInstanceProfile != null && Object.hasOwnProperty.call(message, "iamInstanceProfile")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.iamInstanceProfile); - if (message.sshConfig != null && Object.hasOwnProperty.call(message, "sshConfig")) - $root.google.cloud.gkemulticloud.v1.AwsSshConfig.encode(message.sshConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.securityGroupIds != null && message.securityGroupIds.length) - for (var i = 0; i < message.securityGroupIds.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.securityGroupIds[i]); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.imageType); - if (message.proxyConfig != null && Object.hasOwnProperty.call(message, "proxyConfig")) - $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.encode(message.proxyConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.configEncryption != null && Object.hasOwnProperty.call(message, "configEncryption")) - $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.encode(message.configEncryption, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.instancePlacement != null && Object.hasOwnProperty.call(message, "instancePlacement")) - $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.encode(message.instancePlacement, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.effect != null && Object.hasOwnProperty.call(message, "effect")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.effect); return writer; }; /** - * Encodes the specified AwsNodeConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodeConfig.verify|verify} messages. + * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.NodeTaint.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodeConfig} message AwsNodeConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.INodeTaint} message NodeTaint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + NodeTaint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsNodeConfig message from the specified reader or buffer. + * Decodes a NodeTaint message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsNodeConfig} AwsNodeConfig + * @returns {google.cloud.gkemulticloud.v1.NodeTaint} NodeTaint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsNodeConfig.decode = function decode(reader, length) { + NodeTaint.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsNodeConfig(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.NodeTaint(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.instanceType = reader.string(); + message.key = reader.string(); break; } case 2: { - message.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.decode(reader, reader.uint32()); + message.value = reader.string(); break; } case 3: { - if (!(message.taints && message.taints.length)) - message.taints = []; - message.taints.push($root.google.cloud.gkemulticloud.v1.NodeTaint.decode(reader, reader.uint32())); - break; - } - case 4: { - 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 5: { - if (message.tags === $util.emptyObject) - message.tags = {}; - 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.tags[key] = value; - break; - } - case 6: { - message.iamInstanceProfile = reader.string(); - break; - } - case 11: { - message.imageType = reader.string(); - break; - } - case 9: { - message.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.securityGroupIds && message.securityGroupIds.length)) - message.securityGroupIds = []; - message.securityGroupIds.push(reader.string()); - break; - } - case 12: { - message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.decode(reader, reader.uint32()); - break; - } - case 13: { - message.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.decode(reader, reader.uint32()); - break; - } - case 14: { - message.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.decode(reader, reader.uint32()); + message.effect = reader.int32(); break; } default: @@ -3800,297 +3144,187 @@ }; /** - * Decodes an AwsNodeConfig message from the specified reader or buffer, length delimited. + * Decodes a NodeTaint message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsNodeConfig} AwsNodeConfig + * @returns {google.cloud.gkemulticloud.v1.NodeTaint} NodeTaint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsNodeConfig.decodeDelimited = function decodeDelimited(reader) { + NodeTaint.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsNodeConfig message. + * Verifies a NodeTaint message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsNodeConfig.verify = function verify(message) { + NodeTaint.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.instanceType != null && message.hasOwnProperty("instanceType")) - if (!$util.isString(message.instanceType)) - return "instanceType: string expected"; - if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify(message.rootVolume); - if (error) - return "rootVolume." + error; - } - if (message.taints != null && message.hasOwnProperty("taints")) { - if (!Array.isArray(message.taints)) - return "taints: array expected"; - for (var i = 0; i < message.taints.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.NodeTaint.verify(message.taints[i]); - if (error) - return "taints." + error; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.effect != null && message.hasOwnProperty("effect")) + switch (message.effect) { + default: + return "effect: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } - } - 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.tags != null && message.hasOwnProperty("tags")) { - if (!$util.isObject(message.tags)) - return "tags: object expected"; - var key = Object.keys(message.tags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) - return "tags: string{k:string} expected"; - } - if (message.iamInstanceProfile != null && message.hasOwnProperty("iamInstanceProfile")) - if (!$util.isString(message.iamInstanceProfile)) - return "iamInstanceProfile: string expected"; - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.verify(message.sshConfig); - if (error) - return "sshConfig." + error; - } - if (message.securityGroupIds != null && message.hasOwnProperty("securityGroupIds")) { - if (!Array.isArray(message.securityGroupIds)) - return "securityGroupIds: array expected"; - for (var i = 0; i < message.securityGroupIds.length; ++i) - if (!$util.isString(message.securityGroupIds[i])) - return "securityGroupIds: string[] expected"; - } - if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.verify(message.proxyConfig); - if (error) - return "proxyConfig." + error; - } - if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify(message.configEncryption); - if (error) - return "configEncryption." + error; - } - if (message.instancePlacement != null && message.hasOwnProperty("instancePlacement")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify(message.instancePlacement); - if (error) - return "instancePlacement." + error; - } return null; }; /** - * Creates an AwsNodeConfig message from a plain object. Also converts values to their respective internal types. + * Creates a NodeTaint message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsNodeConfig} AwsNodeConfig + * @returns {google.cloud.gkemulticloud.v1.NodeTaint} NodeTaint */ - AwsNodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsNodeConfig) + NodeTaint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.NodeTaint) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsNodeConfig(); - if (object.instanceType != null) - message.instanceType = String(object.instanceType); - if (object.rootVolume != null) { - if (typeof object.rootVolume !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.rootVolume: object expected"); - message.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.fromObject(object.rootVolume); - } - if (object.taints) { - if (!Array.isArray(object.taints)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.taints: array expected"); - message.taints = []; - for (var i = 0; i < object.taints.length; ++i) { - if (typeof object.taints[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.taints: object expected"); - message.taints[i] = $root.google.cloud.gkemulticloud.v1.NodeTaint.fromObject(object.taints[i]); + var message = new $root.google.cloud.gkemulticloud.v1.NodeTaint(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + switch (object.effect) { + default: + if (typeof object.effect === "number") { + message.effect = object.effect; + break; } - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.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.tags) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.tags: object expected"); - message.tags = {}; - for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) - message.tags[keys[i]] = String(object.tags[keys[i]]); - } - if (object.iamInstanceProfile != null) - message.iamInstanceProfile = String(object.iamInstanceProfile); - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.sshConfig != null) { - if (typeof object.sshConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.sshConfig: object expected"); - message.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.fromObject(object.sshConfig); - } - if (object.securityGroupIds) { - if (!Array.isArray(object.securityGroupIds)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.securityGroupIds: array expected"); - message.securityGroupIds = []; - for (var i = 0; i < object.securityGroupIds.length; ++i) - message.securityGroupIds[i] = String(object.securityGroupIds[i]); - } - if (object.proxyConfig != null) { - if (typeof object.proxyConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.proxyConfig: object expected"); - message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.fromObject(object.proxyConfig); - } - if (object.configEncryption != null) { - if (typeof object.configEncryption !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.configEncryption: object expected"); - message.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.fromObject(object.configEncryption); - } - if (object.instancePlacement != null) { - if (typeof object.instancePlacement !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.instancePlacement: object expected"); - message.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.fromObject(object.instancePlacement); + break; + case "EFFECT_UNSPECIFIED": + case 0: + message.effect = 0; + break; + case "NO_SCHEDULE": + case 1: + message.effect = 1; + break; + case "PREFER_NO_SCHEDULE": + case 2: + message.effect = 2; + break; + case "NO_EXECUTE": + case 3: + message.effect = 3; + break; } return message; }; /** - * Creates a plain object from an AwsNodeConfig message. Also converts values to other types if specified. + * Creates a plain object from a NodeTaint message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static - * @param {google.cloud.gkemulticloud.v1.AwsNodeConfig} message AwsNodeConfig + * @param {google.cloud.gkemulticloud.v1.NodeTaint} message NodeTaint * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsNodeConfig.toObject = function toObject(message, options) { + NodeTaint.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.taints = []; - object.securityGroupIds = []; - } - if (options.objects || options.defaults) { - object.labels = {}; - object.tags = {}; - } if (options.defaults) { - object.instanceType = ""; - object.rootVolume = null; - object.iamInstanceProfile = ""; - object.sshConfig = null; - object.imageType = ""; - object.proxyConfig = null; - object.configEncryption = null; - object.instancePlacement = null; - } - if (message.instanceType != null && message.hasOwnProperty("instanceType")) - object.instanceType = message.instanceType; - if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) - object.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.toObject(message.rootVolume, options); - if (message.taints && message.taints.length) { - object.taints = []; - for (var j = 0; j < message.taints.length; ++j) - object.taints[j] = $root.google.cloud.gkemulticloud.v1.NodeTaint.toObject(message.taints[j], options); - } - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.tags && (keys2 = Object.keys(message.tags)).length) { - object.tags = {}; - for (var j = 0; j < keys2.length; ++j) - object.tags[keys2[j]] = message.tags[keys2[j]]; - } - if (message.iamInstanceProfile != null && message.hasOwnProperty("iamInstanceProfile")) - object.iamInstanceProfile = message.iamInstanceProfile; - if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) - object.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.toObject(message.sshConfig, options); - if (message.securityGroupIds && message.securityGroupIds.length) { - object.securityGroupIds = []; - for (var j = 0; j < message.securityGroupIds.length; ++j) - object.securityGroupIds[j] = message.securityGroupIds[j]; + object.key = ""; + object.value = ""; + object.effect = options.enums === String ? "EFFECT_UNSPECIFIED" : 0; } - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) - object.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.toObject(message.proxyConfig, options); - if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) - object.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.toObject(message.configEncryption, options); - if (message.instancePlacement != null && message.hasOwnProperty("instancePlacement")) - object.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.toObject(message.instancePlacement, options); + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.effect != null && message.hasOwnProperty("effect")) + object.effect = options.enums === String ? $root.google.cloud.gkemulticloud.v1.NodeTaint.Effect[message.effect] === undefined ? message.effect : $root.google.cloud.gkemulticloud.v1.NodeTaint.Effect[message.effect] : message.effect; return object; }; /** - * Converts this AwsNodeConfig to JSON. + * Converts this NodeTaint to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @instance * @returns {Object.} JSON object */ - AwsNodeConfig.prototype.toJSON = function toJSON() { + NodeTaint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsNodeConfig + * Gets the default type url for NodeTaint * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @memberof google.cloud.gkemulticloud.v1.NodeTaint * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NodeTaint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsNodeConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.NodeTaint"; }; - return AwsNodeConfig; + /** + * Effect enum. + * @name google.cloud.gkemulticloud.v1.NodeTaint.Effect + * @enum {number} + * @property {number} EFFECT_UNSPECIFIED=0 EFFECT_UNSPECIFIED value + * @property {number} NO_SCHEDULE=1 NO_SCHEDULE value + * @property {number} PREFER_NO_SCHEDULE=2 PREFER_NO_SCHEDULE value + * @property {number} NO_EXECUTE=3 NO_EXECUTE value + */ + NodeTaint.Effect = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EFFECT_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_SCHEDULE"] = 1; + values[valuesById[2] = "PREFER_NO_SCHEDULE"] = 2; + values[valuesById[3] = "NO_EXECUTE"] = 3; + return values; + })(); + + return NodeTaint; })(); - v1.AwsNodePoolAutoscaling = (function() { + v1.Fleet = (function() { /** - * Properties of an AwsNodePoolAutoscaling. + * Properties of a Fleet. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsNodePoolAutoscaling - * @property {number|null} [minNodeCount] AwsNodePoolAutoscaling minNodeCount - * @property {number|null} [maxNodeCount] AwsNodePoolAutoscaling maxNodeCount + * @interface IFleet + * @property {string|null} [project] Fleet project + * @property {string|null} [membership] Fleet membership */ /** - * Constructs a new AwsNodePoolAutoscaling. + * Constructs a new Fleet. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsNodePoolAutoscaling. - * @implements IAwsNodePoolAutoscaling + * @classdesc Represents a Fleet. + * @implements IFleet * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IFleet=} [properties] Properties to set */ - function AwsNodePoolAutoscaling(properties) { + function Fleet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4098,89 +3332,89 @@ } /** - * AwsNodePoolAutoscaling minNodeCount. - * @member {number} minNodeCount - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * Fleet project. + * @member {string} project + * @memberof google.cloud.gkemulticloud.v1.Fleet * @instance */ - AwsNodePoolAutoscaling.prototype.minNodeCount = 0; + Fleet.prototype.project = ""; /** - * AwsNodePoolAutoscaling maxNodeCount. - * @member {number} maxNodeCount - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * Fleet membership. + * @member {string} membership + * @memberof google.cloud.gkemulticloud.v1.Fleet * @instance */ - AwsNodePoolAutoscaling.prototype.maxNodeCount = 0; + Fleet.prototype.membership = ""; /** - * Creates a new AwsNodePoolAutoscaling instance using the specified properties. + * Creates a new Fleet instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} AwsNodePoolAutoscaling instance + * @param {google.cloud.gkemulticloud.v1.IFleet=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.Fleet} Fleet instance */ - AwsNodePoolAutoscaling.create = function create(properties) { - return new AwsNodePoolAutoscaling(properties); + Fleet.create = function create(properties) { + return new Fleet(properties); }; /** - * Encodes the specified AwsNodePoolAutoscaling message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify|verify} messages. + * Encodes the specified Fleet message. Does not implicitly {@link google.cloud.gkemulticloud.v1.Fleet.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling} message AwsNodePoolAutoscaling message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IFleet} message Fleet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsNodePoolAutoscaling.encode = function encode(message, writer) { + Fleet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.minNodeCount != null && Object.hasOwnProperty.call(message, "minNodeCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minNodeCount); - if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxNodeCount); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.membership); return writer; }; /** - * Encodes the specified AwsNodePoolAutoscaling message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify|verify} messages. + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.Fleet.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static - * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling} message AwsNodePoolAutoscaling message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IFleet} message Fleet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsNodePoolAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + Fleet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsNodePoolAutoscaling message from the specified reader or buffer. + * Decodes a Fleet message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} AwsNodePoolAutoscaling + * @returns {google.cloud.gkemulticloud.v1.Fleet} Fleet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsNodePoolAutoscaling.decode = function decode(reader, length) { + Fleet.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.Fleet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.minNodeCount = reader.int32(); + message.project = reader.string(); break; } case 2: { - message.maxNodeCount = reader.int32(); + message.membership = reader.string(); break; } default: @@ -4192,135 +3426,131 @@ }; /** - * Decodes an AwsNodePoolAutoscaling message from the specified reader or buffer, length delimited. + * Decodes a Fleet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} AwsNodePoolAutoscaling + * @returns {google.cloud.gkemulticloud.v1.Fleet} Fleet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsNodePoolAutoscaling.decodeDelimited = function decodeDelimited(reader) { + Fleet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsNodePoolAutoscaling message. + * Verifies a Fleet message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsNodePoolAutoscaling.verify = function verify(message) { + Fleet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) - if (!$util.isInteger(message.minNodeCount)) - return "minNodeCount: integer expected"; - if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) - if (!$util.isInteger(message.maxNodeCount)) - return "maxNodeCount: integer expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.membership != null && message.hasOwnProperty("membership")) + if (!$util.isString(message.membership)) + return "membership: string expected"; return null; }; /** - * Creates an AwsNodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. + * Creates a Fleet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} AwsNodePoolAutoscaling + * @returns {google.cloud.gkemulticloud.v1.Fleet} Fleet */ - AwsNodePoolAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) + Fleet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.Fleet) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling(); - if (object.minNodeCount != null) - message.minNodeCount = object.minNodeCount | 0; - if (object.maxNodeCount != null) - message.maxNodeCount = object.maxNodeCount | 0; + var message = new $root.google.cloud.gkemulticloud.v1.Fleet(); + if (object.project != null) + message.project = String(object.project); + if (object.membership != null) + message.membership = String(object.membership); return message; }; /** - * Creates a plain object from an AwsNodePoolAutoscaling message. Also converts values to other types if specified. + * Creates a plain object from a Fleet message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static - * @param {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} message AwsNodePoolAutoscaling + * @param {google.cloud.gkemulticloud.v1.Fleet} message Fleet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsNodePoolAutoscaling.toObject = function toObject(message, options) { + Fleet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.minNodeCount = 0; - object.maxNodeCount = 0; + object.project = ""; + object.membership = ""; } - if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) - object.minNodeCount = message.minNodeCount; - if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) - object.maxNodeCount = message.maxNodeCount; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.membership != null && message.hasOwnProperty("membership")) + object.membership = message.membership; return object; }; /** - * Converts this AwsNodePoolAutoscaling to JSON. + * Converts this Fleet to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @instance * @returns {Object.} JSON object */ - AwsNodePoolAutoscaling.prototype.toJSON = function toJSON() { + Fleet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsNodePoolAutoscaling + * Gets the default type url for Fleet * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.Fleet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsNodePoolAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.Fleet"; }; - return AwsNodePoolAutoscaling; + return Fleet; })(); - v1.AwsServerConfig = (function() { + v1.LoggingConfig = (function() { /** - * Properties of an AwsServerConfig. + * Properties of a LoggingConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsServerConfig - * @property {string|null} [name] AwsServerConfig name - * @property {Array.|null} [validVersions] AwsServerConfig validVersions - * @property {Array.|null} [supportedAwsRegions] AwsServerConfig supportedAwsRegions + * @interface ILoggingConfig + * @property {google.cloud.gkemulticloud.v1.ILoggingComponentConfig|null} [componentConfig] LoggingConfig componentConfig */ /** - * Constructs a new AwsServerConfig. + * Constructs a new LoggingConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsServerConfig. - * @implements IAwsServerConfig + * @classdesc Represents a LoggingConfig. + * @implements ILoggingConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsServerConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.ILoggingConfig=} [properties] Properties to set */ - function AwsServerConfig(properties) { - this.validVersions = []; - this.supportedAwsRegions = []; + function LoggingConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4328,109 +3558,75 @@ } /** - * AwsServerConfig name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig - * @instance - */ - AwsServerConfig.prototype.name = ""; - - /** - * AwsServerConfig validVersions. - * @member {Array.} validVersions - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig - * @instance - */ - AwsServerConfig.prototype.validVersions = $util.emptyArray; - - /** - * AwsServerConfig supportedAwsRegions. - * @member {Array.} supportedAwsRegions - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * LoggingConfig componentConfig. + * @member {google.cloud.gkemulticloud.v1.ILoggingComponentConfig|null|undefined} componentConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @instance */ - AwsServerConfig.prototype.supportedAwsRegions = $util.emptyArray; + LoggingConfig.prototype.componentConfig = null; /** - * Creates a new AwsServerConfig instance using the specified properties. + * Creates a new LoggingConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsServerConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsServerConfig} AwsServerConfig instance + * @param {google.cloud.gkemulticloud.v1.ILoggingConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.LoggingConfig} LoggingConfig instance */ - AwsServerConfig.create = function create(properties) { - return new AwsServerConfig(properties); + LoggingConfig.create = function create(properties) { + return new LoggingConfig(properties); }; /** - * Encodes the specified AwsServerConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServerConfig.verify|verify} messages. + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsServerConfig} message AwsServerConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.ILoggingConfig} message LoggingConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsServerConfig.encode = function encode(message, writer) { + LoggingConfig.encode = function encode(message, writer) { 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.validVersions != null && message.validVersions.length) - for (var i = 0; i < message.validVersions.length; ++i) - $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.encode(message.validVersions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.supportedAwsRegions != null && message.supportedAwsRegions.length) - for (var i = 0; i < message.supportedAwsRegions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedAwsRegions[i]); + if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) + $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AwsServerConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServerConfig.verify|verify} messages. + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsServerConfig} message AwsServerConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.ILoggingConfig} message LoggingConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsServerConfig.encodeDelimited = function encodeDelimited(message, writer) { + LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsServerConfig message from the specified reader or buffer. + * Decodes a LoggingConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsServerConfig} AwsServerConfig + * @returns {google.cloud.gkemulticloud.v1.LoggingConfig} LoggingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsServerConfig.decode = function decode(reader, length) { + LoggingConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsServerConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.LoggingConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.validVersions && message.validVersions.length)) - message.validVersions = []; - message.validVersions.push($root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.supportedAwsRegions && message.supportedAwsRegions.length)) - message.supportedAwsRegions = []; - message.supportedAwsRegions.push(reader.string()); + message.componentConfig = $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.decode(reader, reader.uint32()); break; } default: @@ -4442,169 +3638,128 @@ }; /** - * Decodes an AwsServerConfig message from the specified reader or buffer, length delimited. + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsServerConfig} AwsServerConfig + * @returns {google.cloud.gkemulticloud.v1.LoggingConfig} LoggingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsServerConfig.decodeDelimited = function decodeDelimited(reader) { + LoggingConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsServerConfig message. + * Verifies a LoggingConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsServerConfig.verify = function verify(message) { + LoggingConfig.verify = function verify(message) { if (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.validVersions != null && message.hasOwnProperty("validVersions")) { - if (!Array.isArray(message.validVersions)) - return "validVersions: array expected"; - for (var i = 0; i < message.validVersions.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify(message.validVersions[i]); - if (error) - return "validVersions." + error; - } - } - if (message.supportedAwsRegions != null && message.hasOwnProperty("supportedAwsRegions")) { - if (!Array.isArray(message.supportedAwsRegions)) - return "supportedAwsRegions: array expected"; - for (var i = 0; i < message.supportedAwsRegions.length; ++i) - if (!$util.isString(message.supportedAwsRegions[i])) - return "supportedAwsRegions: string[] expected"; + if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify(message.componentConfig); + if (error) + return "componentConfig." + error; } return null; }; /** - * Creates an AwsServerConfig message from a plain object. Also converts values to their respective internal types. + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsServerConfig} AwsServerConfig + * @returns {google.cloud.gkemulticloud.v1.LoggingConfig} LoggingConfig */ - AwsServerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsServerConfig) + LoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.LoggingConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsServerConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.validVersions) { - if (!Array.isArray(object.validVersions)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsServerConfig.validVersions: array expected"); - message.validVersions = []; - for (var i = 0; i < object.validVersions.length; ++i) { - if (typeof object.validVersions[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AwsServerConfig.validVersions: object expected"); - message.validVersions[i] = $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.fromObject(object.validVersions[i]); - } - } - if (object.supportedAwsRegions) { - if (!Array.isArray(object.supportedAwsRegions)) - throw TypeError(".google.cloud.gkemulticloud.v1.AwsServerConfig.supportedAwsRegions: array expected"); - message.supportedAwsRegions = []; - for (var i = 0; i < object.supportedAwsRegions.length; ++i) - message.supportedAwsRegions[i] = String(object.supportedAwsRegions[i]); + var message = new $root.google.cloud.gkemulticloud.v1.LoggingConfig(); + if (object.componentConfig != null) { + if (typeof object.componentConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.LoggingConfig.componentConfig: object expected"); + message.componentConfig = $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.fromObject(object.componentConfig); } return message; }; /** - * Creates a plain object from an AwsServerConfig message. Also converts values to other types if specified. + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static - * @param {google.cloud.gkemulticloud.v1.AwsServerConfig} message AwsServerConfig + * @param {google.cloud.gkemulticloud.v1.LoggingConfig} message LoggingConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsServerConfig.toObject = function toObject(message, options) { + LoggingConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.validVersions = []; - object.supportedAwsRegions = []; - } if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validVersions && message.validVersions.length) { - object.validVersions = []; - for (var j = 0; j < message.validVersions.length; ++j) - object.validVersions[j] = $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.toObject(message.validVersions[j], options); - } - if (message.supportedAwsRegions && message.supportedAwsRegions.length) { - object.supportedAwsRegions = []; - for (var j = 0; j < message.supportedAwsRegions.length; ++j) - object.supportedAwsRegions[j] = message.supportedAwsRegions[j]; - } + object.componentConfig = null; + if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) + object.componentConfig = $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.toObject(message.componentConfig, options); return object; }; /** - * Converts this AwsServerConfig to JSON. + * Converts this LoggingConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @instance * @returns {Object.} JSON object */ - AwsServerConfig.prototype.toJSON = function toJSON() { + LoggingConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsServerConfig + * Gets the default type url for LoggingConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.LoggingConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsServerConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.LoggingConfig"; }; - return AwsServerConfig; + return LoggingConfig; })(); - v1.AwsK8sVersionInfo = (function() { + v1.LoggingComponentConfig = (function() { /** - * Properties of an AwsK8sVersionInfo. + * Properties of a LoggingComponentConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsK8sVersionInfo - * @property {string|null} [version] AwsK8sVersionInfo version + * @interface ILoggingComponentConfig + * @property {Array.|null} [enableComponents] LoggingComponentConfig enableComponents */ /** - * Constructs a new AwsK8sVersionInfo. + * Constructs a new LoggingComponentConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsK8sVersionInfo. - * @implements IAwsK8sVersionInfo + * @classdesc Represents a LoggingComponentConfig. + * @implements ILoggingComponentConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.ILoggingComponentConfig=} [properties] Properties to set */ - function AwsK8sVersionInfo(properties) { + function LoggingComponentConfig(properties) { + this.enableComponents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4612,75 +3767,86 @@ } /** - * AwsK8sVersionInfo version. - * @member {string} version - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * LoggingComponentConfig enableComponents. + * @member {Array.} enableComponents + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @instance */ - AwsK8sVersionInfo.prototype.version = ""; + LoggingComponentConfig.prototype.enableComponents = $util.emptyArray; /** - * Creates a new AwsK8sVersionInfo instance using the specified properties. + * Creates a new LoggingComponentConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} AwsK8sVersionInfo instance + * @param {google.cloud.gkemulticloud.v1.ILoggingComponentConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.LoggingComponentConfig} LoggingComponentConfig instance */ - AwsK8sVersionInfo.create = function create(properties) { - return new AwsK8sVersionInfo(properties); + LoggingComponentConfig.create = function create(properties) { + return new LoggingComponentConfig(properties); }; /** - * Encodes the specified AwsK8sVersionInfo message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify|verify} messages. + * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo} message AwsK8sVersionInfo message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsK8sVersionInfo.encode = function encode(message, writer) { + LoggingComponentConfig.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.enableComponents != null && message.enableComponents.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.enableComponents.length; ++i) + writer.int32(message.enableComponents[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified AwsK8sVersionInfo message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify|verify} messages. + * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo} message AwsK8sVersionInfo message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsK8sVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { + LoggingComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsK8sVersionInfo message from the specified reader or buffer. + * Decodes a LoggingComponentConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} AwsK8sVersionInfo + * @returns {google.cloud.gkemulticloud.v1.LoggingComponentConfig} LoggingComponentConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsK8sVersionInfo.decode = function decode(reader, length) { + LoggingComponentConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); + if (!(message.enableComponents && message.enableComponents.length)) + message.enableComponents = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.enableComponents.push(reader.int32()); + } else + message.enableComponents.push(reader.int32()); break; } default: @@ -4692,122 +3858,174 @@ }; /** - * Decodes an AwsK8sVersionInfo message from the specified reader or buffer, length delimited. + * Decodes a LoggingComponentConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} AwsK8sVersionInfo + * @returns {google.cloud.gkemulticloud.v1.LoggingComponentConfig} LoggingComponentConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsK8sVersionInfo.decodeDelimited = function decodeDelimited(reader) { + LoggingComponentConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsK8sVersionInfo message. + * Verifies a LoggingComponentConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsK8sVersionInfo.verify = function verify(message) { + LoggingComponentConfig.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.enableComponents != null && message.hasOwnProperty("enableComponents")) { + if (!Array.isArray(message.enableComponents)) + return "enableComponents: array expected"; + for (var i = 0; i < message.enableComponents.length; ++i) + switch (message.enableComponents[i]) { + default: + return "enableComponents: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } return null; }; /** - * Creates an AwsK8sVersionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a LoggingComponentConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} AwsK8sVersionInfo + * @returns {google.cloud.gkemulticloud.v1.LoggingComponentConfig} LoggingComponentConfig */ - AwsK8sVersionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) + LoggingComponentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo(); - if (object.version != null) - message.version = String(object.version); + var message = new $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig(); + if (object.enableComponents) { + if (!Array.isArray(object.enableComponents)) + throw TypeError(".google.cloud.gkemulticloud.v1.LoggingComponentConfig.enableComponents: array expected"); + message.enableComponents = []; + for (var i = 0; i < object.enableComponents.length; ++i) + switch (object.enableComponents[i]) { + default: + if (typeof object.enableComponents[i] === "number") { + message.enableComponents[i] = object.enableComponents[i]; + break; + } + case "COMPONENT_UNSPECIFIED": + case 0: + message.enableComponents[i] = 0; + break; + case "SYSTEM_COMPONENTS": + case 1: + message.enableComponents[i] = 1; + break; + case "WORKLOADS": + case 2: + message.enableComponents[i] = 2; + break; + } + } return message; }; /** - * Creates a plain object from an AwsK8sVersionInfo message. Also converts values to other types if specified. + * Creates a plain object from a LoggingComponentConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static - * @param {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} message AwsK8sVersionInfo + * @param {google.cloud.gkemulticloud.v1.LoggingComponentConfig} message LoggingComponentConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsK8sVersionInfo.toObject = function toObject(message, options) { + LoggingComponentConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.version = ""; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; + if (options.arrays || options.defaults) + object.enableComponents = []; + if (message.enableComponents && message.enableComponents.length) { + object.enableComponents = []; + for (var j = 0; j < message.enableComponents.length; ++j) + object.enableComponents[j] = options.enums === String ? $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; + } return object; }; /** - * Converts this AwsK8sVersionInfo to JSON. + * Converts this LoggingComponentConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @instance * @returns {Object.} JSON object */ - AwsK8sVersionInfo.prototype.toJSON = function toJSON() { + LoggingComponentConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsK8sVersionInfo + * Gets the default type url for LoggingComponentConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsK8sVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LoggingComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsK8sVersionInfo"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.LoggingComponentConfig"; }; - return AwsK8sVersionInfo; + /** + * Component enum. + * @name google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component + * @enum {number} + * @property {number} COMPONENT_UNSPECIFIED=0 COMPONENT_UNSPECIFIED value + * @property {number} SYSTEM_COMPONENTS=1 SYSTEM_COMPONENTS value + * @property {number} WORKLOADS=2 WORKLOADS value + */ + LoggingComponentConfig.Component = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPONENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "SYSTEM_COMPONENTS"] = 1; + values[valuesById[2] = "WORKLOADS"] = 2; + return values; + })(); + + return LoggingComponentConfig; })(); - v1.AwsSshConfig = (function() { + v1.MonitoringConfig = (function() { /** - * Properties of an AwsSshConfig. + * Properties of a MonitoringConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsSshConfig - * @property {string|null} [ec2KeyPair] AwsSshConfig ec2KeyPair + * @interface IMonitoringConfig + * @property {google.cloud.gkemulticloud.v1.IManagedPrometheusConfig|null} [managedPrometheusConfig] MonitoringConfig managedPrometheusConfig */ /** - * Constructs a new AwsSshConfig. + * Constructs a new MonitoringConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsSshConfig. - * @implements IAwsSshConfig + * @classdesc Represents a MonitoringConfig. + * @implements IMonitoringConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsSshConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IMonitoringConfig=} [properties] Properties to set */ - function AwsSshConfig(properties) { + function MonitoringConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4815,75 +4033,75 @@ } /** - * AwsSshConfig ec2KeyPair. - * @member {string} ec2KeyPair - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * MonitoringConfig managedPrometheusConfig. + * @member {google.cloud.gkemulticloud.v1.IManagedPrometheusConfig|null|undefined} managedPrometheusConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @instance */ - AwsSshConfig.prototype.ec2KeyPair = ""; + MonitoringConfig.prototype.managedPrometheusConfig = null; /** - * Creates a new AwsSshConfig instance using the specified properties. + * Creates a new MonitoringConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsSshConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsSshConfig} AwsSshConfig instance + * @param {google.cloud.gkemulticloud.v1.IMonitoringConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.MonitoringConfig} MonitoringConfig instance */ - AwsSshConfig.create = function create(properties) { - return new AwsSshConfig(properties); + MonitoringConfig.create = function create(properties) { + return new MonitoringConfig(properties); }; /** - * Encodes the specified AwsSshConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsSshConfig.verify|verify} messages. + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.MonitoringConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsSshConfig} message AwsSshConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsSshConfig.encode = function encode(message, writer) { + MonitoringConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ec2KeyPair != null && Object.hasOwnProperty.call(message, "ec2KeyPair")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ec2KeyPair); + if (message.managedPrometheusConfig != null && Object.hasOwnProperty.call(message, "managedPrometheusConfig")) + $root.google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.encode(message.managedPrometheusConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AwsSshConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsSshConfig.verify|verify} messages. + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.MonitoringConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsSshConfig} message AwsSshConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsSshConfig.encodeDelimited = function encodeDelimited(message, writer) { + MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsSshConfig message from the specified reader or buffer. + * Decodes a MonitoringConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsSshConfig} AwsSshConfig + * @returns {google.cloud.gkemulticloud.v1.MonitoringConfig} MonitoringConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsSshConfig.decode = function decode(reader, length) { + MonitoringConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsSshConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.MonitoringConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.ec2KeyPair = reader.string(); + case 2: { + message.managedPrometheusConfig = $root.google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.decode(reader, reader.uint32()); break; } default: @@ -4895,123 +4113,127 @@ }; /** - * Decodes an AwsSshConfig message from the specified reader or buffer, length delimited. + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsSshConfig} AwsSshConfig + * @returns {google.cloud.gkemulticloud.v1.MonitoringConfig} MonitoringConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsSshConfig.decodeDelimited = function decodeDelimited(reader) { + MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsSshConfig message. + * Verifies a MonitoringConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsSshConfig.verify = function verify(message) { + MonitoringConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ec2KeyPair != null && message.hasOwnProperty("ec2KeyPair")) - if (!$util.isString(message.ec2KeyPair)) - return "ec2KeyPair: string expected"; + if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.verify(message.managedPrometheusConfig); + if (error) + return "managedPrometheusConfig." + error; + } return null; }; /** - * Creates an AwsSshConfig message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsSshConfig} AwsSshConfig + * @returns {google.cloud.gkemulticloud.v1.MonitoringConfig} MonitoringConfig */ - AwsSshConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsSshConfig) + MonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.MonitoringConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsSshConfig(); - if (object.ec2KeyPair != null) - message.ec2KeyPair = String(object.ec2KeyPair); + var message = new $root.google.cloud.gkemulticloud.v1.MonitoringConfig(); + if (object.managedPrometheusConfig != null) { + if (typeof object.managedPrometheusConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.MonitoringConfig.managedPrometheusConfig: object expected"); + message.managedPrometheusConfig = $root.google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.fromObject(object.managedPrometheusConfig); + } return message; }; /** - * Creates a plain object from an AwsSshConfig message. Also converts values to other types if specified. + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static - * @param {google.cloud.gkemulticloud.v1.AwsSshConfig} message AwsSshConfig + * @param {google.cloud.gkemulticloud.v1.MonitoringConfig} message MonitoringConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsSshConfig.toObject = function toObject(message, options) { + MonitoringConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.ec2KeyPair = ""; - if (message.ec2KeyPair != null && message.hasOwnProperty("ec2KeyPair")) - object.ec2KeyPair = message.ec2KeyPair; + object.managedPrometheusConfig = null; + if (message.managedPrometheusConfig != null && message.hasOwnProperty("managedPrometheusConfig")) + object.managedPrometheusConfig = $root.google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.toObject(message.managedPrometheusConfig, options); return object; }; /** - * Converts this AwsSshConfig to JSON. + * Converts this MonitoringConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @instance * @returns {Object.} JSON object */ - AwsSshConfig.prototype.toJSON = function toJSON() { + MonitoringConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsSshConfig + * Gets the default type url for MonitoringConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @memberof google.cloud.gkemulticloud.v1.MonitoringConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsSshConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsSshConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.MonitoringConfig"; }; - return AwsSshConfig; + return MonitoringConfig; })(); - v1.AwsProxyConfig = (function() { + v1.ManagedPrometheusConfig = (function() { /** - * Properties of an AwsProxyConfig. + * Properties of a ManagedPrometheusConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsProxyConfig - * @property {string|null} [secretArn] AwsProxyConfig secretArn - * @property {string|null} [secretVersion] AwsProxyConfig secretVersion + * @interface IManagedPrometheusConfig + * @property {boolean|null} [enabled] ManagedPrometheusConfig enabled */ /** - * Constructs a new AwsProxyConfig. + * Constructs a new ManagedPrometheusConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsProxyConfig. - * @implements IAwsProxyConfig + * @classdesc Represents a ManagedPrometheusConfig. + * @implements IManagedPrometheusConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsProxyConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IManagedPrometheusConfig=} [properties] Properties to set */ - function AwsProxyConfig(properties) { + function ManagedPrometheusConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5019,89 +4241,75 @@ } /** - * AwsProxyConfig secretArn. - * @member {string} secretArn - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig - * @instance - */ - AwsProxyConfig.prototype.secretArn = ""; - - /** - * AwsProxyConfig secretVersion. - * @member {string} secretVersion - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * ManagedPrometheusConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @instance */ - AwsProxyConfig.prototype.secretVersion = ""; + ManagedPrometheusConfig.prototype.enabled = false; /** - * Creates a new AwsProxyConfig instance using the specified properties. + * Creates a new ManagedPrometheusConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsProxyConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsProxyConfig} AwsProxyConfig instance + * @param {google.cloud.gkemulticloud.v1.IManagedPrometheusConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ManagedPrometheusConfig} ManagedPrometheusConfig instance */ - AwsProxyConfig.create = function create(properties) { - return new AwsProxyConfig(properties); + ManagedPrometheusConfig.create = function create(properties) { + return new ManagedPrometheusConfig(properties); }; /** - * Encodes the specified AwsProxyConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsProxyConfig.verify|verify} messages. + * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsProxyConfig} message AwsProxyConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsProxyConfig.encode = function encode(message, writer) { + ManagedPrometheusConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.secretArn != null && Object.hasOwnProperty.call(message, "secretArn")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretArn); - if (message.secretVersion != null && Object.hasOwnProperty.call(message, "secretVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.secretVersion); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); return writer; }; /** - * Encodes the specified AwsProxyConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsProxyConfig.verify|verify} messages. + * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ManagedPrometheusConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAwsProxyConfig} message AwsProxyConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsProxyConfig.encodeDelimited = function encodeDelimited(message, writer) { + ManagedPrometheusConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsProxyConfig message from the specified reader or buffer. + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsProxyConfig} AwsProxyConfig + * @returns {google.cloud.gkemulticloud.v1.ManagedPrometheusConfig} ManagedPrometheusConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsProxyConfig.decode = function decode(reader, length) { + ManagedPrometheusConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsProxyConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ManagedPrometheusConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.secretArn = reader.string(); - break; - } - case 2: { - message.secretVersion = reader.string(); + message.enabled = reader.bool(); break; } default: @@ -5113,334 +4321,423 @@ }; /** - * Decodes an AwsProxyConfig message from the specified reader or buffer, length delimited. + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsProxyConfig} AwsProxyConfig + * @returns {google.cloud.gkemulticloud.v1.ManagedPrometheusConfig} ManagedPrometheusConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsProxyConfig.decodeDelimited = function decodeDelimited(reader) { + ManagedPrometheusConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsProxyConfig message. + * Verifies a ManagedPrometheusConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsProxyConfig.verify = function verify(message) { + ManagedPrometheusConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.secretArn != null && message.hasOwnProperty("secretArn")) - if (!$util.isString(message.secretArn)) - return "secretArn: string expected"; - if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) - if (!$util.isString(message.secretVersion)) - return "secretVersion: string expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; return null; }; /** - * Creates an AwsProxyConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ManagedPrometheusConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsProxyConfig} AwsProxyConfig + * @returns {google.cloud.gkemulticloud.v1.ManagedPrometheusConfig} ManagedPrometheusConfig */ - AwsProxyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsProxyConfig) + ManagedPrometheusConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ManagedPrometheusConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsProxyConfig(); - if (object.secretArn != null) - message.secretArn = String(object.secretArn); - if (object.secretVersion != null) - message.secretVersion = String(object.secretVersion); + var message = new $root.google.cloud.gkemulticloud.v1.ManagedPrometheusConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); return message; }; /** - * Creates a plain object from an AwsProxyConfig message. Also converts values to other types if specified. + * Creates a plain object from a ManagedPrometheusConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static - * @param {google.cloud.gkemulticloud.v1.AwsProxyConfig} message AwsProxyConfig + * @param {google.cloud.gkemulticloud.v1.ManagedPrometheusConfig} message ManagedPrometheusConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsProxyConfig.toObject = function toObject(message, options) { + ManagedPrometheusConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.secretArn = ""; - object.secretVersion = ""; - } - if (message.secretArn != null && message.hasOwnProperty("secretArn")) - object.secretArn = message.secretArn; - if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) - object.secretVersion = message.secretVersion; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; return object; }; /** - * Converts this AwsProxyConfig to JSON. + * Converts this ManagedPrometheusConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @instance * @returns {Object.} JSON object */ - AwsProxyConfig.prototype.toJSON = function toJSON() { + ManagedPrometheusConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsProxyConfig + * Gets the default type url for ManagedPrometheusConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @memberof google.cloud.gkemulticloud.v1.ManagedPrometheusConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsProxyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ManagedPrometheusConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsProxyConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ManagedPrometheusConfig"; }; - return AwsProxyConfig; + return ManagedPrometheusConfig; })(); - v1.AwsConfigEncryption = (function() { - - /** - * Properties of an AwsConfigEncryption. - * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsConfigEncryption - * @property {string|null} [kmsKeyArn] AwsConfigEncryption kmsKeyArn - */ + v1.AttachedClusters = (function() { /** - * Constructs a new AwsConfigEncryption. + * Constructs a new AttachedClusters service. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsConfigEncryption. - * @implements IAwsConfigEncryption + * @classdesc Represents an AttachedClusters + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsConfigEncryption=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function AwsConfigEncryption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function AttachedClusters(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * AwsConfigEncryption kmsKeyArn. - * @member {string} kmsKeyArn - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @instance - */ - AwsConfigEncryption.prototype.kmsKeyArn = ""; + (AttachedClusters.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AttachedClusters; /** - * Creates a new AwsConfigEncryption instance using the specified properties. + * Creates new AttachedClusters service using the specified rpc implementation. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters * @static - * @param {google.cloud.gkemulticloud.v1.IAwsConfigEncryption=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsConfigEncryption} AwsConfigEncryption instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AttachedClusters} RPC service. Useful where requests and/or responses are streamed. */ - AwsConfigEncryption.create = function create(properties) { - return new AwsConfigEncryption(properties); + AttachedClusters.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified AwsConfigEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @static - * @param {google.cloud.gkemulticloud.v1.IAwsConfigEncryption} message AwsConfigEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|createAttachedCluster}. + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @typedef CreateAttachedClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - AwsConfigEncryption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kmsKeyArn != null && Object.hasOwnProperty.call(message, "kmsKeyArn")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyArn); - return writer; - }; /** - * Encodes the specified AwsConfigEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @static - * @param {google.cloud.gkemulticloud.v1.IAwsConfigEncryption} message AwsConfigEncryption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateAttachedCluster. + * @function createAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest} request CreateAttachedClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - AwsConfigEncryption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(AttachedClusters.prototype.createAttachedCluster = function createAttachedCluster(request, callback) { + return this.rpcCall(createAttachedCluster, $root.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAttachedCluster" }); /** - * Decodes an AwsConfigEncryption message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsConfigEncryption} AwsConfigEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateAttachedCluster. + * @function createAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest} request CreateAttachedClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AwsConfigEncryption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kmsKeyArn = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an AwsConfigEncryption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsConfigEncryption} AwsConfigEncryption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|updateAttachedCluster}. + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @typedef UpdateAttachedClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - AwsConfigEncryption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an AwsConfigEncryption message. - * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateAttachedCluster. + * @function updateAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest} request UpdateAttachedClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - AwsConfigEncryption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) - if (!$util.isString(message.kmsKeyArn)) - return "kmsKeyArn: string expected"; - return null; - }; + Object.defineProperty(AttachedClusters.prototype.updateAttachedCluster = function updateAttachedCluster(request, callback) { + return this.rpcCall(updateAttachedCluster, $root.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAttachedCluster" }); /** - * Creates an AwsConfigEncryption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsConfigEncryption} AwsConfigEncryption + * Calls UpdateAttachedCluster. + * @function updateAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest} request UpdateAttachedClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AwsConfigEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption) - return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption(); - if (object.kmsKeyArn != null) - message.kmsKeyArn = String(object.kmsKeyArn); - return message; - }; /** - * Creates a plain object from an AwsConfigEncryption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @static - * @param {google.cloud.gkemulticloud.v1.AwsConfigEncryption} message AwsConfigEncryption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|importAttachedCluster}. + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @typedef ImportAttachedClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - AwsConfigEncryption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.kmsKeyArn = ""; - if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) - object.kmsKeyArn = message.kmsKeyArn; - return object; - }; /** - * Converts this AwsConfigEncryption to JSON. - * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * Calls ImportAttachedCluster. + * @function importAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters * @instance - * @returns {Object.} JSON object + * @param {google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest} request ImportAttachedClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - AwsConfigEncryption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(AttachedClusters.prototype.importAttachedCluster = function importAttachedCluster(request, callback) { + return this.rpcCall(importAttachedCluster, $root.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportAttachedCluster" }); /** - * Gets the default type url for AwsConfigEncryption - * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls ImportAttachedCluster. + * @function importAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest} request ImportAttachedClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AwsConfigEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsConfigEncryption"; - }; - return AwsConfigEncryption; + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|getAttachedCluster}. + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @typedef GetAttachedClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.AttachedCluster} [response] AttachedCluster + */ + + /** + * Calls GetAttachedCluster. + * @function getAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest} request GetAttachedClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedClusterCallback} callback Node-style callback called with the error, if any, and AttachedCluster + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AttachedClusters.prototype.getAttachedCluster = function getAttachedCluster(request, callback) { + return this.rpcCall(getAttachedCluster, $root.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest, $root.google.cloud.gkemulticloud.v1.AttachedCluster, request, callback); + }, "name", { value: "GetAttachedCluster" }); + + /** + * Calls GetAttachedCluster. + * @function getAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest} request GetAttachedClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|listAttachedClusters}. + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @typedef ListAttachedClustersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.ListAttachedClustersResponse} [response] ListAttachedClustersResponse + */ + + /** + * Calls ListAttachedClusters. + * @function listAttachedClusters + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersRequest} request ListAttachedClustersRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClustersCallback} callback Node-style callback called with the error, if any, and ListAttachedClustersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AttachedClusters.prototype.listAttachedClusters = function listAttachedClusters(request, callback) { + return this.rpcCall(listAttachedClusters, $root.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest, $root.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse, request, callback); + }, "name", { value: "ListAttachedClusters" }); + + /** + * Calls ListAttachedClusters. + * @function listAttachedClusters + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersRequest} request ListAttachedClustersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|deleteAttachedCluster}. + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @typedef DeleteAttachedClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAttachedCluster. + * @function deleteAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest} request DeleteAttachedClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AttachedClusters.prototype.deleteAttachedCluster = function deleteAttachedCluster(request, callback) { + return this.rpcCall(deleteAttachedCluster, $root.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAttachedCluster" }); + + /** + * Calls DeleteAttachedCluster. + * @function deleteAttachedCluster + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest} request DeleteAttachedClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|getAttachedServerConfig}. + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @typedef GetAttachedServerConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.AttachedServerConfig} [response] AttachedServerConfig + */ + + /** + * Calls GetAttachedServerConfig. + * @function getAttachedServerConfig + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest} request GetAttachedServerConfigRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfigCallback} callback Node-style callback called with the error, if any, and AttachedServerConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AttachedClusters.prototype.getAttachedServerConfig = function getAttachedServerConfig(request, callback) { + return this.rpcCall(getAttachedServerConfig, $root.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest, $root.google.cloud.gkemulticloud.v1.AttachedServerConfig, request, callback); + }, "name", { value: "GetAttachedServerConfig" }); + + /** + * Calls GetAttachedServerConfig. + * @function getAttachedServerConfig + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest} request GetAttachedServerConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AttachedClusters|generateAttachedClusterInstallManifest}. + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @typedef GenerateAttachedClusterInstallManifestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse} [response] GenerateAttachedClusterInstallManifestResponse + */ + + /** + * Calls GenerateAttachedClusterInstallManifest. + * @function generateAttachedClusterInstallManifest + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest} request GenerateAttachedClusterInstallManifestRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifestCallback} callback Node-style callback called with the error, if any, and GenerateAttachedClusterInstallManifestResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AttachedClusters.prototype.generateAttachedClusterInstallManifest = function generateAttachedClusterInstallManifest(request, callback) { + return this.rpcCall(generateAttachedClusterInstallManifest, $root.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest, $root.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse, request, callback); + }, "name", { value: "GenerateAttachedClusterInstallManifest" }); + + /** + * Calls GenerateAttachedClusterInstallManifest. + * @function generateAttachedClusterInstallManifest + * @memberof google.cloud.gkemulticloud.v1.AttachedClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest} request GenerateAttachedClusterInstallManifestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AttachedClusters; })(); - v1.AwsInstancePlacement = (function() { + v1.GenerateAttachedClusterInstallManifestRequest = (function() { /** - * Properties of an AwsInstancePlacement. + * Properties of a GenerateAttachedClusterInstallManifestRequest. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAwsInstancePlacement - * @property {google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy|null} [tenancy] AwsInstancePlacement tenancy + * @interface IGenerateAttachedClusterInstallManifestRequest + * @property {string|null} [parent] GenerateAttachedClusterInstallManifestRequest parent + * @property {string|null} [attachedClusterId] GenerateAttachedClusterInstallManifestRequest attachedClusterId + * @property {string|null} [platformVersion] GenerateAttachedClusterInstallManifestRequest platformVersion */ /** - * Constructs a new AwsInstancePlacement. + * Constructs a new GenerateAttachedClusterInstallManifestRequest. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsInstancePlacement. - * @implements IAwsInstancePlacement + * @classdesc Represents a GenerateAttachedClusterInstallManifestRequest. + * @implements IGenerateAttachedClusterInstallManifestRequest * @constructor - * @param {google.cloud.gkemulticloud.v1.IAwsInstancePlacement=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest=} [properties] Properties to set */ - function AwsInstancePlacement(properties) { + function GenerateAttachedClusterInstallManifestRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5448,75 +4745,103 @@ } /** - * AwsInstancePlacement tenancy. - * @member {google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy} tenancy - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * GenerateAttachedClusterInstallManifestRequest parent. + * @member {string} parent + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @instance */ - AwsInstancePlacement.prototype.tenancy = 0; + GenerateAttachedClusterInstallManifestRequest.prototype.parent = ""; /** - * Creates a new AwsInstancePlacement instance using the specified properties. + * GenerateAttachedClusterInstallManifestRequest attachedClusterId. + * @member {string} attachedClusterId + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest + * @instance + */ + GenerateAttachedClusterInstallManifestRequest.prototype.attachedClusterId = ""; + + /** + * GenerateAttachedClusterInstallManifestRequest platformVersion. + * @member {string} platformVersion + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest + * @instance + */ + GenerateAttachedClusterInstallManifestRequest.prototype.platformVersion = ""; + + /** + * Creates a new GenerateAttachedClusterInstallManifestRequest instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static - * @param {google.cloud.gkemulticloud.v1.IAwsInstancePlacement=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AwsInstancePlacement} AwsInstancePlacement instance + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest} GenerateAttachedClusterInstallManifestRequest instance */ - AwsInstancePlacement.create = function create(properties) { - return new AwsInstancePlacement(properties); + GenerateAttachedClusterInstallManifestRequest.create = function create(properties) { + return new GenerateAttachedClusterInstallManifestRequest(properties); }; /** - * Encodes the specified AwsInstancePlacement message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify|verify} messages. + * Encodes the specified GenerateAttachedClusterInstallManifestRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static - * @param {google.cloud.gkemulticloud.v1.IAwsInstancePlacement} message AwsInstancePlacement message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest} message GenerateAttachedClusterInstallManifestRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsInstancePlacement.encode = function encode(message, writer) { + GenerateAttachedClusterInstallManifestRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tenancy != null && Object.hasOwnProperty.call(message, "tenancy")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tenancy); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.attachedClusterId != null && Object.hasOwnProperty.call(message, "attachedClusterId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.attachedClusterId); + if (message.platformVersion != null && Object.hasOwnProperty.call(message, "platformVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.platformVersion); return writer; }; /** - * Encodes the specified AwsInstancePlacement message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify|verify} messages. + * Encodes the specified GenerateAttachedClusterInstallManifestRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static - * @param {google.cloud.gkemulticloud.v1.IAwsInstancePlacement} message AwsInstancePlacement message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest} message GenerateAttachedClusterInstallManifestRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AwsInstancePlacement.encodeDelimited = function encodeDelimited(message, writer) { + GenerateAttachedClusterInstallManifestRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AwsInstancePlacement message from the specified reader or buffer. + * Decodes a GenerateAttachedClusterInstallManifestRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AwsInstancePlacement} AwsInstancePlacement + * @returns {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest} GenerateAttachedClusterInstallManifestRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsInstancePlacement.decode = function decode(reader, length) { + GenerateAttachedClusterInstallManifestRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tenancy = reader.int32(); + message.parent = reader.string(); + break; + } + case 2: { + message.attachedClusterId = reader.string(); + break; + } + case 3: { + message.platformVersion = reader.string(); break; } default: @@ -5528,171 +4853,139 @@ }; /** - * Decodes an AwsInstancePlacement message from the specified reader or buffer, length delimited. + * Decodes a GenerateAttachedClusterInstallManifestRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AwsInstancePlacement} AwsInstancePlacement + * @returns {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest} GenerateAttachedClusterInstallManifestRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AwsInstancePlacement.decodeDelimited = function decodeDelimited(reader) { + GenerateAttachedClusterInstallManifestRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AwsInstancePlacement message. + * Verifies a GenerateAttachedClusterInstallManifestRequest message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AwsInstancePlacement.verify = function verify(message) { + GenerateAttachedClusterInstallManifestRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tenancy != null && message.hasOwnProperty("tenancy")) - switch (message.tenancy) { - default: - return "tenancy: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.attachedClusterId != null && message.hasOwnProperty("attachedClusterId")) + if (!$util.isString(message.attachedClusterId)) + return "attachedClusterId: string expected"; + if (message.platformVersion != null && message.hasOwnProperty("platformVersion")) + if (!$util.isString(message.platformVersion)) + return "platformVersion: string expected"; return null; }; /** - * Creates an AwsInstancePlacement message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateAttachedClusterInstallManifestRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AwsInstancePlacement} AwsInstancePlacement + * @returns {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest} GenerateAttachedClusterInstallManifestRequest */ - AwsInstancePlacement.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement) + GenerateAttachedClusterInstallManifestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement(); - switch (object.tenancy) { - default: - if (typeof object.tenancy === "number") { - message.tenancy = object.tenancy; - break; - } - break; - case "TENANCY_UNSPECIFIED": - case 0: - message.tenancy = 0; - break; - case "DEFAULT": - case 1: - message.tenancy = 1; - break; - case "DEDICATED": - case 2: - message.tenancy = 2; - break; - case "HOST": - case 3: - message.tenancy = 3; - break; - } + var message = new $root.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.attachedClusterId != null) + message.attachedClusterId = String(object.attachedClusterId); + if (object.platformVersion != null) + message.platformVersion = String(object.platformVersion); return message; }; /** - * Creates a plain object from an AwsInstancePlacement message. Also converts values to other types if specified. + * Creates a plain object from a GenerateAttachedClusterInstallManifestRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static - * @param {google.cloud.gkemulticloud.v1.AwsInstancePlacement} message AwsInstancePlacement + * @param {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest} message GenerateAttachedClusterInstallManifestRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AwsInstancePlacement.toObject = function toObject(message, options) { + GenerateAttachedClusterInstallManifestRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.tenancy = options.enums === String ? "TENANCY_UNSPECIFIED" : 0; - if (message.tenancy != null && message.hasOwnProperty("tenancy")) - object.tenancy = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy[message.tenancy] === undefined ? message.tenancy : $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy[message.tenancy] : message.tenancy; + if (options.defaults) { + object.parent = ""; + object.attachedClusterId = ""; + object.platformVersion = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.attachedClusterId != null && message.hasOwnProperty("attachedClusterId")) + object.attachedClusterId = message.attachedClusterId; + if (message.platformVersion != null && message.hasOwnProperty("platformVersion")) + object.platformVersion = message.platformVersion; return object; }; /** - * Converts this AwsInstancePlacement to JSON. + * Converts this GenerateAttachedClusterInstallManifestRequest to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @instance * @returns {Object.} JSON object */ - AwsInstancePlacement.prototype.toJSON = function toJSON() { + GenerateAttachedClusterInstallManifestRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AwsInstancePlacement + * Gets the default type url for GenerateAttachedClusterInstallManifestRequest * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AwsInstancePlacement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerateAttachedClusterInstallManifestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsInstancePlacement"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest"; }; - /** - * Tenancy enum. - * @name google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy - * @enum {number} - * @property {number} TENANCY_UNSPECIFIED=0 TENANCY_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} DEDICATED=2 DEDICATED value - * @property {number} HOST=3 HOST value - */ - AwsInstancePlacement.Tenancy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TENANCY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "DEDICATED"] = 2; - values[valuesById[3] = "HOST"] = 3; - return values; - })(); - - return AwsInstancePlacement; + return GenerateAttachedClusterInstallManifestRequest; })(); - v1.WorkloadIdentityConfig = (function() { + v1.GenerateAttachedClusterInstallManifestResponse = (function() { /** - * Properties of a WorkloadIdentityConfig. + * Properties of a GenerateAttachedClusterInstallManifestResponse. * @memberof google.cloud.gkemulticloud.v1 - * @interface IWorkloadIdentityConfig - * @property {string|null} [issuerUri] WorkloadIdentityConfig issuerUri - * @property {string|null} [workloadPool] WorkloadIdentityConfig workloadPool - * @property {string|null} [identityProvider] WorkloadIdentityConfig identityProvider + * @interface IGenerateAttachedClusterInstallManifestResponse + * @property {string|null} [manifest] GenerateAttachedClusterInstallManifestResponse manifest */ /** - * Constructs a new WorkloadIdentityConfig. + * Constructs a new GenerateAttachedClusterInstallManifestResponse. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a WorkloadIdentityConfig. - * @implements IWorkloadIdentityConfig + * @classdesc Represents a GenerateAttachedClusterInstallManifestResponse. + * @implements IGenerateAttachedClusterInstallManifestResponse * @constructor - * @param {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse=} [properties] Properties to set */ - function WorkloadIdentityConfig(properties) { + function GenerateAttachedClusterInstallManifestResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5700,103 +4993,75 @@ } /** - * WorkloadIdentityConfig issuerUri. - * @member {string} issuerUri - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig - * @instance - */ - WorkloadIdentityConfig.prototype.issuerUri = ""; - - /** - * WorkloadIdentityConfig workloadPool. - * @member {string} workloadPool - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig - * @instance - */ - WorkloadIdentityConfig.prototype.workloadPool = ""; - - /** - * WorkloadIdentityConfig identityProvider. - * @member {string} identityProvider - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * GenerateAttachedClusterInstallManifestResponse manifest. + * @member {string} manifest + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @instance */ - WorkloadIdentityConfig.prototype.identityProvider = ""; + GenerateAttachedClusterInstallManifestResponse.prototype.manifest = ""; /** - * Creates a new WorkloadIdentityConfig instance using the specified properties. + * Creates a new GenerateAttachedClusterInstallManifestResponse instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static - * @param {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} WorkloadIdentityConfig instance + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse} GenerateAttachedClusterInstallManifestResponse instance */ - WorkloadIdentityConfig.create = function create(properties) { - return new WorkloadIdentityConfig(properties); + GenerateAttachedClusterInstallManifestResponse.create = function create(properties) { + return new GenerateAttachedClusterInstallManifestResponse(properties); }; /** - * Encodes the specified WorkloadIdentityConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify|verify} messages. + * Encodes the specified GenerateAttachedClusterInstallManifestResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static - * @param {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse} message GenerateAttachedClusterInstallManifestResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkloadIdentityConfig.encode = function encode(message, writer) { + GenerateAttachedClusterInstallManifestResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issuerUri != null && Object.hasOwnProperty.call(message, "issuerUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuerUri); - if (message.workloadPool != null && Object.hasOwnProperty.call(message, "workloadPool")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.workloadPool); - if (message.identityProvider != null && Object.hasOwnProperty.call(message, "identityProvider")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identityProvider); + if (message.manifest != null && Object.hasOwnProperty.call(message, "manifest")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.manifest); return writer; }; /** - * Encodes the specified WorkloadIdentityConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify|verify} messages. + * Encodes the specified GenerateAttachedClusterInstallManifestResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static - * @param {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig} message WorkloadIdentityConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse} message GenerateAttachedClusterInstallManifestResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkloadIdentityConfig.encodeDelimited = function encodeDelimited(message, writer) { + GenerateAttachedClusterInstallManifestResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer. + * Decodes a GenerateAttachedClusterInstallManifestResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} WorkloadIdentityConfig + * @returns {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse} GenerateAttachedClusterInstallManifestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkloadIdentityConfig.decode = function decode(reader, length) { + GenerateAttachedClusterInstallManifestResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.issuerUri = reader.string(); - break; - } - case 2: { - message.workloadPool = reader.string(); - break; - } - case 3: { - message.identityProvider = reader.string(); + message.manifest = reader.string(); break; } default: @@ -5808,139 +5073,125 @@ }; /** - * Decodes a WorkloadIdentityConfig message from the specified reader or buffer, length delimited. + * Decodes a GenerateAttachedClusterInstallManifestResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} WorkloadIdentityConfig + * @returns {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse} GenerateAttachedClusterInstallManifestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkloadIdentityConfig.decodeDelimited = function decodeDelimited(reader) { + GenerateAttachedClusterInstallManifestResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WorkloadIdentityConfig message. + * Verifies a GenerateAttachedClusterInstallManifestResponse message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WorkloadIdentityConfig.verify = function verify(message) { + GenerateAttachedClusterInstallManifestResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issuerUri != null && message.hasOwnProperty("issuerUri")) - if (!$util.isString(message.issuerUri)) - return "issuerUri: string expected"; - if (message.workloadPool != null && message.hasOwnProperty("workloadPool")) - if (!$util.isString(message.workloadPool)) - return "workloadPool: string expected"; - if (message.identityProvider != null && message.hasOwnProperty("identityProvider")) - if (!$util.isString(message.identityProvider)) - return "identityProvider: string expected"; + if (message.manifest != null && message.hasOwnProperty("manifest")) + if (!$util.isString(message.manifest)) + return "manifest: string expected"; return null; }; /** - * Creates a WorkloadIdentityConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateAttachedClusterInstallManifestResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} WorkloadIdentityConfig + * @returns {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse} GenerateAttachedClusterInstallManifestResponse */ - WorkloadIdentityConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig) + GenerateAttachedClusterInstallManifestResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse) return object; - var message = new $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig(); - if (object.issuerUri != null) - message.issuerUri = String(object.issuerUri); - if (object.workloadPool != null) - message.workloadPool = String(object.workloadPool); - if (object.identityProvider != null) - message.identityProvider = String(object.identityProvider); + var message = new $root.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse(); + if (object.manifest != null) + message.manifest = String(object.manifest); return message; }; /** - * Creates a plain object from a WorkloadIdentityConfig message. Also converts values to other types if specified. + * Creates a plain object from a GenerateAttachedClusterInstallManifestResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static - * @param {google.cloud.gkemulticloud.v1.WorkloadIdentityConfig} message WorkloadIdentityConfig + * @param {google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse} message GenerateAttachedClusterInstallManifestResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WorkloadIdentityConfig.toObject = function toObject(message, options) { + GenerateAttachedClusterInstallManifestResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.issuerUri = ""; - object.workloadPool = ""; - object.identityProvider = ""; - } - if (message.issuerUri != null && message.hasOwnProperty("issuerUri")) - object.issuerUri = message.issuerUri; - if (message.workloadPool != null && message.hasOwnProperty("workloadPool")) - object.workloadPool = message.workloadPool; - if (message.identityProvider != null && message.hasOwnProperty("identityProvider")) - object.identityProvider = message.identityProvider; + if (options.defaults) + object.manifest = ""; + if (message.manifest != null && message.hasOwnProperty("manifest")) + object.manifest = message.manifest; return object; }; /** - * Converts this WorkloadIdentityConfig to JSON. + * Converts this GenerateAttachedClusterInstallManifestResponse to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @instance * @returns {Object.} JSON object */ - WorkloadIdentityConfig.prototype.toJSON = function toJSON() { + GenerateAttachedClusterInstallManifestResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for WorkloadIdentityConfig + * Gets the default type url for GenerateAttachedClusterInstallManifestResponse * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.WorkloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - WorkloadIdentityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerateAttachedClusterInstallManifestResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.WorkloadIdentityConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse"; }; - return WorkloadIdentityConfig; + return GenerateAttachedClusterInstallManifestResponse; })(); - v1.MaxPodsConstraint = (function() { + v1.CreateAttachedClusterRequest = (function() { /** - * Properties of a MaxPodsConstraint. + * Properties of a CreateAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.v1 - * @interface IMaxPodsConstraint - * @property {number|Long|null} [maxPodsPerNode] MaxPodsConstraint maxPodsPerNode + * @interface ICreateAttachedClusterRequest + * @property {string|null} [parent] CreateAttachedClusterRequest parent + * @property {google.cloud.gkemulticloud.v1.IAttachedCluster|null} [attachedCluster] CreateAttachedClusterRequest attachedCluster + * @property {string|null} [attachedClusterId] CreateAttachedClusterRequest attachedClusterId + * @property {boolean|null} [validateOnly] CreateAttachedClusterRequest validateOnly */ /** - * Constructs a new MaxPodsConstraint. + * Constructs a new CreateAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a MaxPodsConstraint. - * @implements IMaxPodsConstraint + * @classdesc Represents a CreateAttachedClusterRequest. + * @implements ICreateAttachedClusterRequest * @constructor - * @param {google.cloud.gkemulticloud.v1.IMaxPodsConstraint=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest=} [properties] Properties to set */ - function MaxPodsConstraint(properties) { + function CreateAttachedClusterRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5948,75 +5199,117 @@ } /** - * MaxPodsConstraint maxPodsPerNode. - * @member {number|Long} maxPodsPerNode - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * CreateAttachedClusterRequest parent. + * @member {string} parent + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @instance */ - MaxPodsConstraint.prototype.maxPodsPerNode = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CreateAttachedClusterRequest.prototype.parent = ""; /** - * Creates a new MaxPodsConstraint instance using the specified properties. + * CreateAttachedClusterRequest attachedCluster. + * @member {google.cloud.gkemulticloud.v1.IAttachedCluster|null|undefined} attachedCluster + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest + * @instance + */ + CreateAttachedClusterRequest.prototype.attachedCluster = null; + + /** + * CreateAttachedClusterRequest attachedClusterId. + * @member {string} attachedClusterId + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest + * @instance + */ + CreateAttachedClusterRequest.prototype.attachedClusterId = ""; + + /** + * CreateAttachedClusterRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest + * @instance + */ + CreateAttachedClusterRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAttachedClusterRequest instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IMaxPodsConstraint=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.MaxPodsConstraint} MaxPodsConstraint instance + * @param {google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest} CreateAttachedClusterRequest instance */ - MaxPodsConstraint.create = function create(properties) { - return new MaxPodsConstraint(properties); + CreateAttachedClusterRequest.create = function create(properties) { + return new CreateAttachedClusterRequest(properties); }; /** - * Encodes the specified MaxPodsConstraint message. Does not implicitly {@link google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify|verify} messages. + * Encodes the specified CreateAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest} message CreateAttachedClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaxPodsConstraint.encode = function encode(message, writer) { + CreateAttachedClusterRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxPodsPerNode); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.attachedCluster != null && Object.hasOwnProperty.call(message, "attachedCluster")) + $root.google.cloud.gkemulticloud.v1.AttachedCluster.encode(message.attachedCluster, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attachedClusterId != null && Object.hasOwnProperty.call(message, "attachedClusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.attachedClusterId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified MaxPodsConstraint message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify|verify} messages. + * Encodes the specified CreateAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IMaxPodsConstraint} message MaxPodsConstraint message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest} message CreateAttachedClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MaxPodsConstraint.encodeDelimited = function encodeDelimited(message, writer) { + CreateAttachedClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MaxPodsConstraint message from the specified reader or buffer. + * Decodes a CreateAttachedClusterRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.MaxPodsConstraint} MaxPodsConstraint + * @returns {google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest} CreateAttachedClusterRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MaxPodsConstraint.decode = function decode(reader, length) { + CreateAttachedClusterRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.maxPodsPerNode = reader.int64(); + message.parent = reader.string(); + break; + } + case 2: { + message.attachedCluster = $root.google.cloud.gkemulticloud.v1.AttachedCluster.decode(reader, reader.uint32()); + break; + } + case 3: { + message.attachedClusterId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -6028,140 +5321,156 @@ }; /** - * Decodes a MaxPodsConstraint message from the specified reader or buffer, length delimited. + * Decodes a CreateAttachedClusterRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.MaxPodsConstraint} MaxPodsConstraint + * @returns {google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest} CreateAttachedClusterRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MaxPodsConstraint.decodeDelimited = function decodeDelimited(reader) { + CreateAttachedClusterRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MaxPodsConstraint message. + * Verifies a CreateAttachedClusterRequest message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MaxPodsConstraint.verify = function verify(message) { + CreateAttachedClusterRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) - if (!$util.isInteger(message.maxPodsPerNode) && !(message.maxPodsPerNode && $util.isInteger(message.maxPodsPerNode.low) && $util.isInteger(message.maxPodsPerNode.high))) - return "maxPodsPerNode: integer|Long expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.attachedCluster != null && message.hasOwnProperty("attachedCluster")) { + var error = $root.google.cloud.gkemulticloud.v1.AttachedCluster.verify(message.attachedCluster); + if (error) + return "attachedCluster." + error; + } + if (message.attachedClusterId != null && message.hasOwnProperty("attachedClusterId")) + if (!$util.isString(message.attachedClusterId)) + return "attachedClusterId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a MaxPodsConstraint message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.MaxPodsConstraint} MaxPodsConstraint + * @returns {google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest} CreateAttachedClusterRequest */ - MaxPodsConstraint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint) + CreateAttachedClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest) return object; - var message = new $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint(); - if (object.maxPodsPerNode != null) - if ($util.Long) - (message.maxPodsPerNode = $util.Long.fromValue(object.maxPodsPerNode)).unsigned = false; - else if (typeof object.maxPodsPerNode === "string") - message.maxPodsPerNode = parseInt(object.maxPodsPerNode, 10); - else if (typeof object.maxPodsPerNode === "number") - message.maxPodsPerNode = object.maxPodsPerNode; - else if (typeof object.maxPodsPerNode === "object") - message.maxPodsPerNode = new $util.LongBits(object.maxPodsPerNode.low >>> 0, object.maxPodsPerNode.high >>> 0).toNumber(); + var message = new $root.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.attachedCluster != null) { + if (typeof object.attachedCluster !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest.attachedCluster: object expected"); + message.attachedCluster = $root.google.cloud.gkemulticloud.v1.AttachedCluster.fromObject(object.attachedCluster); + } + if (object.attachedClusterId != null) + message.attachedClusterId = String(object.attachedClusterId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a MaxPodsConstraint message. Also converts values to other types if specified. + * Creates a plain object from a CreateAttachedClusterRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.MaxPodsConstraint} message MaxPodsConstraint + * @param {google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest} message CreateAttachedClusterRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MaxPodsConstraint.toObject = function toObject(message, options) { + CreateAttachedClusterRequest.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.maxPodsPerNode = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxPodsPerNode = options.longs === String ? "0" : 0; - if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) - if (typeof message.maxPodsPerNode === "number") - object.maxPodsPerNode = options.longs === String ? String(message.maxPodsPerNode) : message.maxPodsPerNode; - else - object.maxPodsPerNode = options.longs === String ? $util.Long.prototype.toString.call(message.maxPodsPerNode) : options.longs === Number ? new $util.LongBits(message.maxPodsPerNode.low >>> 0, message.maxPodsPerNode.high >>> 0).toNumber() : message.maxPodsPerNode; + if (options.defaults) { + object.parent = ""; + object.attachedCluster = null; + object.attachedClusterId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.attachedCluster != null && message.hasOwnProperty("attachedCluster")) + object.attachedCluster = $root.google.cloud.gkemulticloud.v1.AttachedCluster.toObject(message.attachedCluster, options); + if (message.attachedClusterId != null && message.hasOwnProperty("attachedClusterId")) + object.attachedClusterId = message.attachedClusterId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this MaxPodsConstraint to JSON. + * Converts this CreateAttachedClusterRequest to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @instance * @returns {Object.} JSON object */ - MaxPodsConstraint.prototype.toJSON = function toJSON() { + CreateAttachedClusterRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MaxPodsConstraint + * Gets the default type url for CreateAttachedClusterRequest * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.MaxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MaxPodsConstraint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAttachedClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.MaxPodsConstraint"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest"; }; - return MaxPodsConstraint; + return CreateAttachedClusterRequest; })(); - v1.OperationMetadata = (function() { + v1.ImportAttachedClusterRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of an ImportAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.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} [statusDetail] OperationMetadata statusDetail - * @property {string|null} [errorDetail] OperationMetadata errorDetail + * @interface IImportAttachedClusterRequest + * @property {string|null} [parent] ImportAttachedClusterRequest parent + * @property {boolean|null} [validateOnly] ImportAttachedClusterRequest validateOnly + * @property {string|null} [fleetMembership] ImportAttachedClusterRequest fleetMembership + * @property {string|null} [platformVersion] ImportAttachedClusterRequest platformVersion + * @property {string|null} [distribution] ImportAttachedClusterRequest distribution */ /** - * Constructs a new OperationMetadata. + * Constructs a new ImportAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents an ImportAttachedClusterRequest. + * @implements IImportAttachedClusterRequest * @constructor - * @param {google.cloud.gkemulticloud.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function ImportAttachedClusterRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6169,131 +5478,131 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * ImportAttachedClusterRequest parent. + * @member {string} parent + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @instance */ - OperationMetadata.prototype.createTime = null; + ImportAttachedClusterRequest.prototype.parent = ""; /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * ImportAttachedClusterRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @instance */ - OperationMetadata.prototype.endTime = null; + ImportAttachedClusterRequest.prototype.validateOnly = false; /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * ImportAttachedClusterRequest fleetMembership. + * @member {string} fleetMembership + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @instance */ - OperationMetadata.prototype.target = ""; + ImportAttachedClusterRequest.prototype.fleetMembership = ""; /** - * OperationMetadata statusDetail. - * @member {string} statusDetail - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * ImportAttachedClusterRequest platformVersion. + * @member {string} platformVersion + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @instance */ - OperationMetadata.prototype.statusDetail = ""; + ImportAttachedClusterRequest.prototype.platformVersion = ""; /** - * OperationMetadata errorDetail. - * @member {string} errorDetail - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * ImportAttachedClusterRequest distribution. + * @member {string} distribution + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @instance */ - OperationMetadata.prototype.errorDetail = ""; + ImportAttachedClusterRequest.prototype.distribution = ""; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ImportAttachedClusterRequest instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest} ImportAttachedClusterRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + ImportAttachedClusterRequest.create = function create(properties) { + return new ImportAttachedClusterRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.gkemulticloud.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified ImportAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest} message ImportAttachedClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + ImportAttachedClusterRequest.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.statusDetail); - if (message.errorDetail != null && Object.hasOwnProperty.call(message, "errorDetail")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.errorDetail); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + if (message.fleetMembership != null && Object.hasOwnProperty.call(message, "fleetMembership")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fleetMembership); + if (message.platformVersion != null && Object.hasOwnProperty.call(message, "platformVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.platformVersion); + if (message.distribution != null && Object.hasOwnProperty.call(message, "distribution")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.distribution); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified ImportAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest} message ImportAttachedClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportAttachedClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes an ImportAttachedClusterRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest} ImportAttachedClusterRequest * @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) { + ImportAttachedClusterRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.validateOnly = reader.bool(); break; } case 3: { - message.target = reader.string(); + message.fleetMembership = reader.string(); break; } case 4: { - message.statusDetail = reader.string(); + message.platformVersion = reader.string(); break; } case 5: { - message.errorDetail = reader.string(); + message.distribution = reader.string(); break; } default: @@ -6305,167 +5614,157 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportAttachedClusterRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest} ImportAttachedClusterRequest * @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) { + ImportAttachedClusterRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies an ImportAttachedClusterRequest message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @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) { + ImportAttachedClusterRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) - if (!$util.isString(message.statusDetail)) - return "statusDetail: string expected"; - if (message.errorDetail != null && message.hasOwnProperty("errorDetail")) - if (!$util.isString(message.errorDetail)) - return "errorDetail: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.fleetMembership != null && message.hasOwnProperty("fleetMembership")) + if (!$util.isString(message.fleetMembership)) + return "fleetMembership: string expected"; + if (message.platformVersion != null && message.hasOwnProperty("platformVersion")) + if (!$util.isString(message.platformVersion)) + return "platformVersion: string expected"; + if (message.distribution != null && message.hasOwnProperty("distribution")) + if (!$util.isString(message.distribution)) + return "distribution: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest} ImportAttachedClusterRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.OperationMetadata) + ImportAttachedClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest) return object; - var message = new $root.google.cloud.gkemulticloud.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.gkemulticloud.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.gkemulticloud.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.statusDetail != null) - message.statusDetail = String(object.statusDetail); - if (object.errorDetail != null) - message.errorDetail = String(object.errorDetail); + var message = new $root.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.fleetMembership != null) + message.fleetMembership = String(object.fleetMembership); + if (object.platformVersion != null) + message.platformVersion = String(object.platformVersion); + if (object.distribution != null) + message.distribution = String(object.distribution); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportAttachedClusterRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest} message ImportAttachedClusterRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + ImportAttachedClusterRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.statusDetail = ""; - object.errorDetail = ""; + object.parent = ""; + object.validateOnly = false; + object.fleetMembership = ""; + object.platformVersion = ""; + object.distribution = ""; } - 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.statusDetail != null && message.hasOwnProperty("statusDetail")) - object.statusDetail = message.statusDetail; - if (message.errorDetail != null && message.hasOwnProperty("errorDetail")) - object.errorDetail = message.errorDetail; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.fleetMembership != null && message.hasOwnProperty("fleetMembership")) + object.fleetMembership = message.fleetMembership; + if (message.platformVersion != null && message.hasOwnProperty("platformVersion")) + object.platformVersion = message.platformVersion; + if (message.distribution != null && message.hasOwnProperty("distribution")) + object.distribution = message.distribution; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this ImportAttachedClusterRequest to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + ImportAttachedClusterRequest.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 ImportAttachedClusterRequest * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.OperationMetadata + * @memberof google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportAttachedClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest"; }; - return OperationMetadata; + return ImportAttachedClusterRequest; })(); - v1.NodeTaint = (function() { + v1.UpdateAttachedClusterRequest = (function() { /** - * Properties of a NodeTaint. + * Properties of an UpdateAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.v1 - * @interface INodeTaint - * @property {string|null} [key] NodeTaint key - * @property {string|null} [value] NodeTaint value - * @property {google.cloud.gkemulticloud.v1.NodeTaint.Effect|null} [effect] NodeTaint effect + * @interface IUpdateAttachedClusterRequest + * @property {google.cloud.gkemulticloud.v1.IAttachedCluster|null} [attachedCluster] UpdateAttachedClusterRequest attachedCluster + * @property {boolean|null} [validateOnly] UpdateAttachedClusterRequest validateOnly + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAttachedClusterRequest updateMask */ /** - * Constructs a new NodeTaint. + * Constructs a new UpdateAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a NodeTaint. - * @implements INodeTaint + * @classdesc Represents an UpdateAttachedClusterRequest. + * @implements IUpdateAttachedClusterRequest * @constructor - * @param {google.cloud.gkemulticloud.v1.INodeTaint=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest=} [properties] Properties to set */ - function NodeTaint(properties) { + function UpdateAttachedClusterRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6473,103 +5772,103 @@ } /** - * NodeTaint key. - * @member {string} key - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * UpdateAttachedClusterRequest attachedCluster. + * @member {google.cloud.gkemulticloud.v1.IAttachedCluster|null|undefined} attachedCluster + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @instance */ - NodeTaint.prototype.key = ""; + UpdateAttachedClusterRequest.prototype.attachedCluster = null; /** - * NodeTaint value. - * @member {string} value - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * UpdateAttachedClusterRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @instance */ - NodeTaint.prototype.value = ""; + UpdateAttachedClusterRequest.prototype.validateOnly = false; /** - * NodeTaint effect. - * @member {google.cloud.gkemulticloud.v1.NodeTaint.Effect} effect - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * UpdateAttachedClusterRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @instance */ - NodeTaint.prototype.effect = 0; + UpdateAttachedClusterRequest.prototype.updateMask = null; /** - * Creates a new NodeTaint instance using the specified properties. + * Creates a new UpdateAttachedClusterRequest instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.INodeTaint=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.NodeTaint} NodeTaint instance + * @param {google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest} UpdateAttachedClusterRequest instance */ - NodeTaint.create = function create(properties) { - return new NodeTaint(properties); + UpdateAttachedClusterRequest.create = function create(properties) { + return new UpdateAttachedClusterRequest(properties); }; /** - * Encodes the specified NodeTaint message. Does not implicitly {@link google.cloud.gkemulticloud.v1.NodeTaint.verify|verify} messages. + * Encodes the specified UpdateAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.INodeTaint} message NodeTaint message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest} message UpdateAttachedClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeTaint.encode = function encode(message, writer) { + UpdateAttachedClusterRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.effect != null && Object.hasOwnProperty.call(message, "effect")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.effect); + if (message.attachedCluster != null && Object.hasOwnProperty.call(message, "attachedCluster")) + $root.google.cloud.gkemulticloud.v1.AttachedCluster.encode(message.attachedCluster, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified NodeTaint message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.NodeTaint.verify|verify} messages. + * Encodes the specified UpdateAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.INodeTaint} message NodeTaint message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest} message UpdateAttachedClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeTaint.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAttachedClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NodeTaint message from the specified reader or buffer. + * Decodes an UpdateAttachedClusterRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.NodeTaint} NodeTaint + * @returns {google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest} UpdateAttachedClusterRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodeTaint.decode = function decode(reader, length) { + UpdateAttachedClusterRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.NodeTaint(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.key = reader.string(); + message.attachedCluster = $root.google.cloud.gkemulticloud.v1.AttachedCluster.decode(reader, reader.uint32()); break; } case 2: { - message.value = reader.string(); + message.validateOnly = reader.bool(); break; } case 3: { - message.effect = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -6581,187 +5880,149 @@ }; /** - * Decodes a NodeTaint message from the specified reader or buffer, length delimited. + * Decodes an UpdateAttachedClusterRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.NodeTaint} NodeTaint + * @returns {google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest} UpdateAttachedClusterRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodeTaint.decodeDelimited = function decodeDelimited(reader) { + UpdateAttachedClusterRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NodeTaint message. + * Verifies an UpdateAttachedClusterRequest message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NodeTaint.verify = function verify(message) { + UpdateAttachedClusterRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.effect != null && message.hasOwnProperty("effect")) - switch (message.effect) { - default: - return "effect: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.attachedCluster != null && message.hasOwnProperty("attachedCluster")) { + var error = $root.google.cloud.gkemulticloud.v1.AttachedCluster.verify(message.attachedCluster); + if (error) + return "attachedCluster." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a NodeTaint message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.NodeTaint} NodeTaint + * @returns {google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest} UpdateAttachedClusterRequest */ - NodeTaint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.NodeTaint) + UpdateAttachedClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest) return object; - var message = new $root.google.cloud.gkemulticloud.v1.NodeTaint(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - switch (object.effect) { - default: - if (typeof object.effect === "number") { - message.effect = object.effect; - break; - } - break; - case "EFFECT_UNSPECIFIED": - case 0: - message.effect = 0; - break; - case "NO_SCHEDULE": - case 1: - message.effect = 1; - break; - case "PREFER_NO_SCHEDULE": - case 2: - message.effect = 2; - break; - case "NO_EXECUTE": - case 3: - message.effect = 3; - break; + var message = new $root.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest(); + if (object.attachedCluster != null) { + if (typeof object.attachedCluster !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.attachedCluster: object expected"); + message.attachedCluster = $root.google.cloud.gkemulticloud.v1.AttachedCluster.fromObject(object.attachedCluster); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a NodeTaint message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAttachedClusterRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.NodeTaint} message NodeTaint + * @param {google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest} message UpdateAttachedClusterRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodeTaint.toObject = function toObject(message, options) { + UpdateAttachedClusterRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.key = ""; - object.value = ""; - object.effect = options.enums === String ? "EFFECT_UNSPECIFIED" : 0; + object.attachedCluster = null; + object.validateOnly = false; + object.updateMask = null; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.effect != null && message.hasOwnProperty("effect")) - object.effect = options.enums === String ? $root.google.cloud.gkemulticloud.v1.NodeTaint.Effect[message.effect] === undefined ? message.effect : $root.google.cloud.gkemulticloud.v1.NodeTaint.Effect[message.effect] : message.effect; + if (message.attachedCluster != null && message.hasOwnProperty("attachedCluster")) + object.attachedCluster = $root.google.cloud.gkemulticloud.v1.AttachedCluster.toObject(message.attachedCluster, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this NodeTaint to JSON. + * Converts this UpdateAttachedClusterRequest to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @instance * @returns {Object.} JSON object */ - NodeTaint.prototype.toJSON = function toJSON() { + UpdateAttachedClusterRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NodeTaint + * Gets the default type url for UpdateAttachedClusterRequest * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.NodeTaint + * @memberof google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NodeTaint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateAttachedClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.NodeTaint"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest"; }; - /** - * Effect enum. - * @name google.cloud.gkemulticloud.v1.NodeTaint.Effect - * @enum {number} - * @property {number} EFFECT_UNSPECIFIED=0 EFFECT_UNSPECIFIED value - * @property {number} NO_SCHEDULE=1 NO_SCHEDULE value - * @property {number} PREFER_NO_SCHEDULE=2 PREFER_NO_SCHEDULE value - * @property {number} NO_EXECUTE=3 NO_EXECUTE value - */ - NodeTaint.Effect = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EFFECT_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_SCHEDULE"] = 1; - values[valuesById[2] = "PREFER_NO_SCHEDULE"] = 2; - values[valuesById[3] = "NO_EXECUTE"] = 3; - return values; - })(); - - return NodeTaint; + return UpdateAttachedClusterRequest; })(); - v1.Fleet = (function() { + v1.GetAttachedClusterRequest = (function() { /** - * Properties of a Fleet. + * Properties of a GetAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.v1 - * @interface IFleet - * @property {string|null} [project] Fleet project - * @property {string|null} [membership] Fleet membership + * @interface IGetAttachedClusterRequest + * @property {string|null} [name] GetAttachedClusterRequest name */ /** - * Constructs a new Fleet. + * Constructs a new GetAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a Fleet. - * @implements IFleet + * @classdesc Represents a GetAttachedClusterRequest. + * @implements IGetAttachedClusterRequest * @constructor - * @param {google.cloud.gkemulticloud.v1.IFleet=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest=} [properties] Properties to set */ - function Fleet(properties) { + function GetAttachedClusterRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6769,89 +6030,75 @@ } /** - * Fleet project. - * @member {string} project - * @memberof google.cloud.gkemulticloud.v1.Fleet - * @instance - */ - Fleet.prototype.project = ""; - - /** - * Fleet membership. - * @member {string} membership - * @memberof google.cloud.gkemulticloud.v1.Fleet + * GetAttachedClusterRequest name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @instance */ - Fleet.prototype.membership = ""; + GetAttachedClusterRequest.prototype.name = ""; /** - * Creates a new Fleet instance using the specified properties. + * Creates a new GetAttachedClusterRequest instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IFleet=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.Fleet} Fleet instance + * @param {google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GetAttachedClusterRequest} GetAttachedClusterRequest instance */ - Fleet.create = function create(properties) { - return new Fleet(properties); + GetAttachedClusterRequest.create = function create(properties) { + return new GetAttachedClusterRequest(properties); }; /** - * Encodes the specified Fleet message. Does not implicitly {@link google.cloud.gkemulticloud.v1.Fleet.verify|verify} messages. + * Encodes the specified GetAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAttachedClusterRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IFleet} message Fleet message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest} message GetAttachedClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fleet.encode = function encode(message, writer) { + GetAttachedClusterRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.membership); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.Fleet.verify|verify} messages. + * Encodes the specified GetAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAttachedClusterRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.IFleet} message Fleet message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest} message GetAttachedClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fleet.encodeDelimited = function encodeDelimited(message, writer) { + GetAttachedClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Fleet message from the specified reader or buffer. + * Decodes a GetAttachedClusterRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.Fleet} Fleet + * @returns {google.cloud.gkemulticloud.v1.GetAttachedClusterRequest} GetAttachedClusterRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fleet.decode = function decode(reader, length) { + GetAttachedClusterRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.Fleet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.membership = reader.string(); + message.name = reader.string(); break; } default: @@ -6863,131 +6110,124 @@ }; /** - * Decodes a Fleet message from the specified reader or buffer, length delimited. + * Decodes a GetAttachedClusterRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.Fleet} Fleet + * @returns {google.cloud.gkemulticloud.v1.GetAttachedClusterRequest} GetAttachedClusterRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fleet.decodeDelimited = function decodeDelimited(reader) { + GetAttachedClusterRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Fleet message. + * Verifies a GetAttachedClusterRequest message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Fleet.verify = function verify(message) { + GetAttachedClusterRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.membership != null && message.hasOwnProperty("membership")) - if (!$util.isString(message.membership)) - return "membership: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a Fleet message from a plain object. Also converts values to their respective internal types. + * Creates a GetAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.Fleet} Fleet + * @returns {google.cloud.gkemulticloud.v1.GetAttachedClusterRequest} GetAttachedClusterRequest */ - Fleet.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.Fleet) + GetAttachedClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest) return object; - var message = new $root.google.cloud.gkemulticloud.v1.Fleet(); - if (object.project != null) - message.project = String(object.project); - if (object.membership != null) - message.membership = String(object.membership); + var message = new $root.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a Fleet message. Also converts values to other types if specified. + * Creates a plain object from a GetAttachedClusterRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static - * @param {google.cloud.gkemulticloud.v1.Fleet} message Fleet + * @param {google.cloud.gkemulticloud.v1.GetAttachedClusterRequest} message GetAttachedClusterRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Fleet.toObject = function toObject(message, options) { + GetAttachedClusterRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.project = ""; - object.membership = ""; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.membership != null && message.hasOwnProperty("membership")) - object.membership = message.membership; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this Fleet to JSON. + * Converts this GetAttachedClusterRequest to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @instance * @returns {Object.} JSON object */ - Fleet.prototype.toJSON = function toJSON() { + GetAttachedClusterRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Fleet + * Gets the default type url for GetAttachedClusterRequest * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.Fleet + * @memberof google.cloud.gkemulticloud.v1.GetAttachedClusterRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAttachedClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.Fleet"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GetAttachedClusterRequest"; }; - return Fleet; + return GetAttachedClusterRequest; })(); - v1.LoggingConfig = (function() { + v1.ListAttachedClustersRequest = (function() { /** - * Properties of a LoggingConfig. + * Properties of a ListAttachedClustersRequest. * @memberof google.cloud.gkemulticloud.v1 - * @interface ILoggingConfig - * @property {google.cloud.gkemulticloud.v1.ILoggingComponentConfig|null} [componentConfig] LoggingConfig componentConfig + * @interface IListAttachedClustersRequest + * @property {string|null} [parent] ListAttachedClustersRequest parent + * @property {number|null} [pageSize] ListAttachedClustersRequest pageSize + * @property {string|null} [pageToken] ListAttachedClustersRequest pageToken */ /** - * Constructs a new LoggingConfig. + * Constructs a new ListAttachedClustersRequest. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a LoggingConfig. - * @implements ILoggingConfig + * @classdesc Represents a ListAttachedClustersRequest. + * @implements IListAttachedClustersRequest * @constructor - * @param {google.cloud.gkemulticloud.v1.ILoggingConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersRequest=} [properties] Properties to set */ - function LoggingConfig(properties) { + function ListAttachedClustersRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6995,75 +6235,103 @@ } /** - * LoggingConfig componentConfig. - * @member {google.cloud.gkemulticloud.v1.ILoggingComponentConfig|null|undefined} componentConfig - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * ListAttachedClustersRequest parent. + * @member {string} parent + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @instance */ - LoggingConfig.prototype.componentConfig = null; + ListAttachedClustersRequest.prototype.parent = ""; /** - * Creates a new LoggingConfig instance using the specified properties. + * ListAttachedClustersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest + * @instance + */ + ListAttachedClustersRequest.prototype.pageSize = 0; + + /** + * ListAttachedClustersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest + * @instance + */ + ListAttachedClustersRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAttachedClustersRequest instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static - * @param {google.cloud.gkemulticloud.v1.ILoggingConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.LoggingConfig} LoggingConfig instance + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ListAttachedClustersRequest} ListAttachedClustersRequest instance */ - LoggingConfig.create = function create(properties) { - return new LoggingConfig(properties); + ListAttachedClustersRequest.create = function create(properties) { + return new ListAttachedClustersRequest(properties); }; /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingConfig.verify|verify} messages. + * Encodes the specified ListAttachedClustersRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAttachedClustersRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static - * @param {google.cloud.gkemulticloud.v1.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersRequest} message ListAttachedClustersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingConfig.encode = function encode(message, writer) { + ListAttachedClustersRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.componentConfig != null && Object.hasOwnProperty.call(message, "componentConfig")) - $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.encode(message.componentConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingConfig.verify|verify} messages. + * Encodes the specified ListAttachedClustersRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAttachedClustersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static - * @param {google.cloud.gkemulticloud.v1.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersRequest} message ListAttachedClustersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListAttachedClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LoggingConfig message from the specified reader or buffer. + * Decodes a ListAttachedClustersRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.LoggingConfig} LoggingConfig + * @returns {google.cloud.gkemulticloud.v1.ListAttachedClustersRequest} ListAttachedClustersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingConfig.decode = function decode(reader, length) { + ListAttachedClustersRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.LoggingConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.componentConfig = $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.decode(reader, reader.uint32()); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -7075,128 +6343,141 @@ }; /** - * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * Decodes a ListAttachedClustersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.LoggingConfig} LoggingConfig + * @returns {google.cloud.gkemulticloud.v1.ListAttachedClustersRequest} ListAttachedClustersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingConfig.decodeDelimited = function decodeDelimited(reader) { + ListAttachedClustersRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LoggingConfig message. + * Verifies a ListAttachedClustersRequest message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LoggingConfig.verify = function verify(message) { + ListAttachedClustersRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify(message.componentConfig); - if (error) - return "componentConfig." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListAttachedClustersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.LoggingConfig} LoggingConfig + * @returns {google.cloud.gkemulticloud.v1.ListAttachedClustersRequest} ListAttachedClustersRequest */ - LoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.LoggingConfig) + ListAttachedClustersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest) return object; - var message = new $root.google.cloud.gkemulticloud.v1.LoggingConfig(); - if (object.componentConfig != null) { - if (typeof object.componentConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.LoggingConfig.componentConfig: object expected"); - message.componentConfig = $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.fromObject(object.componentConfig); - } + var message = new $root.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListAttachedClustersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static - * @param {google.cloud.gkemulticloud.v1.LoggingConfig} message LoggingConfig + * @param {google.cloud.gkemulticloud.v1.ListAttachedClustersRequest} message ListAttachedClustersRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LoggingConfig.toObject = function toObject(message, options) { + ListAttachedClustersRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.componentConfig = null; - if (message.componentConfig != null && message.hasOwnProperty("componentConfig")) - object.componentConfig = $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.toObject(message.componentConfig, options); + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this LoggingConfig to JSON. + * Converts this ListAttachedClustersRequest to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @instance * @returns {Object.} JSON object */ - LoggingConfig.prototype.toJSON = function toJSON() { + ListAttachedClustersRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LoggingConfig + * Gets the default type url for ListAttachedClustersRequest * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.LoggingConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAttachedClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.LoggingConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAttachedClustersRequest"; }; - return LoggingConfig; + return ListAttachedClustersRequest; })(); - v1.LoggingComponentConfig = (function() { + v1.ListAttachedClustersResponse = (function() { /** - * Properties of a LoggingComponentConfig. + * Properties of a ListAttachedClustersResponse. * @memberof google.cloud.gkemulticloud.v1 - * @interface ILoggingComponentConfig - * @property {Array.|null} [enableComponents] LoggingComponentConfig enableComponents + * @interface IListAttachedClustersResponse + * @property {Array.|null} [attachedClusters] ListAttachedClustersResponse attachedClusters + * @property {string|null} [nextPageToken] ListAttachedClustersResponse nextPageToken */ /** - * Constructs a new LoggingComponentConfig. + * Constructs a new ListAttachedClustersResponse. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a LoggingComponentConfig. - * @implements ILoggingComponentConfig + * @classdesc Represents a ListAttachedClustersResponse. + * @implements IListAttachedClustersResponse * @constructor - * @param {google.cloud.gkemulticloud.v1.ILoggingComponentConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersResponse=} [properties] Properties to set */ - function LoggingComponentConfig(properties) { - this.enableComponents = []; + function ListAttachedClustersResponse(properties) { + this.attachedClusters = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7204,86 +6485,92 @@ } /** - * LoggingComponentConfig enableComponents. - * @member {Array.} enableComponents - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * ListAttachedClustersResponse attachedClusters. + * @member {Array.} attachedClusters + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @instance */ - LoggingComponentConfig.prototype.enableComponents = $util.emptyArray; + ListAttachedClustersResponse.prototype.attachedClusters = $util.emptyArray; /** - * Creates a new LoggingComponentConfig instance using the specified properties. + * ListAttachedClustersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse + * @instance + */ + ListAttachedClustersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAttachedClustersResponse instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static - * @param {google.cloud.gkemulticloud.v1.ILoggingComponentConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.LoggingComponentConfig} LoggingComponentConfig instance + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersResponse=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ListAttachedClustersResponse} ListAttachedClustersResponse instance */ - LoggingComponentConfig.create = function create(properties) { - return new LoggingComponentConfig(properties); + ListAttachedClustersResponse.create = function create(properties) { + return new ListAttachedClustersResponse(properties); }; /** - * Encodes the specified LoggingComponentConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify|verify} messages. + * Encodes the specified ListAttachedClustersResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static - * @param {google.cloud.gkemulticloud.v1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersResponse} message ListAttachedClustersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingComponentConfig.encode = function encode(message, writer) { + ListAttachedClustersResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableComponents != null && message.enableComponents.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.enableComponents.length; ++i) - writer.int32(message.enableComponents[i]); - writer.ldelim(); - } + if (message.attachedClusters != null && message.attachedClusters.length) + for (var i = 0; i < message.attachedClusters.length; ++i) + $root.google.cloud.gkemulticloud.v1.AttachedCluster.encode(message.attachedClusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified LoggingComponentConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.LoggingComponentConfig.verify|verify} messages. + * Encodes the specified ListAttachedClustersResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static - * @param {google.cloud.gkemulticloud.v1.ILoggingComponentConfig} message LoggingComponentConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IListAttachedClustersResponse} message ListAttachedClustersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingComponentConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListAttachedClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LoggingComponentConfig message from the specified reader or buffer. + * Decodes a ListAttachedClustersResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.LoggingComponentConfig} LoggingComponentConfig + * @returns {google.cloud.gkemulticloud.v1.ListAttachedClustersResponse} ListAttachedClustersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingComponentConfig.decode = function decode(reader, length) { + ListAttachedClustersResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.enableComponents && message.enableComponents.length)) - message.enableComponents = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.enableComponents.push(reader.int32()); - } else - message.enableComponents.push(reader.int32()); + if (!(message.attachedClusters && message.attachedClusters.length)) + message.attachedClusters = []; + message.attachedClusters.push($root.google.cloud.gkemulticloud.v1.AttachedCluster.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -7295,726 +6582,1033 @@ }; /** - * Decodes a LoggingComponentConfig message from the specified reader or buffer, length delimited. + * Decodes a ListAttachedClustersResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.LoggingComponentConfig} LoggingComponentConfig + * @returns {google.cloud.gkemulticloud.v1.ListAttachedClustersResponse} ListAttachedClustersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingComponentConfig.decodeDelimited = function decodeDelimited(reader) { + ListAttachedClustersResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LoggingComponentConfig message. + * Verifies a ListAttachedClustersResponse message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LoggingComponentConfig.verify = function verify(message) { + ListAttachedClustersResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enableComponents != null && message.hasOwnProperty("enableComponents")) { - if (!Array.isArray(message.enableComponents)) - return "enableComponents: array expected"; - for (var i = 0; i < message.enableComponents.length; ++i) - switch (message.enableComponents[i]) { - default: - return "enableComponents: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } + if (message.attachedClusters != null && message.hasOwnProperty("attachedClusters")) { + if (!Array.isArray(message.attachedClusters)) + return "attachedClusters: array expected"; + for (var i = 0; i < message.attachedClusters.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AttachedCluster.verify(message.attachedClusters[i]); + if (error) + return "attachedClusters." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a LoggingComponentConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListAttachedClustersResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.LoggingComponentConfig} LoggingComponentConfig + * @returns {google.cloud.gkemulticloud.v1.ListAttachedClustersResponse} ListAttachedClustersResponse */ - LoggingComponentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig) + ListAttachedClustersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse) return object; - var message = new $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig(); - if (object.enableComponents) { - if (!Array.isArray(object.enableComponents)) - throw TypeError(".google.cloud.gkemulticloud.v1.LoggingComponentConfig.enableComponents: array expected"); - message.enableComponents = []; - for (var i = 0; i < object.enableComponents.length; ++i) - switch (object.enableComponents[i]) { - default: - if (typeof object.enableComponents[i] === "number") { - message.enableComponents[i] = object.enableComponents[i]; - break; - } - case "COMPONENT_UNSPECIFIED": - case 0: - message.enableComponents[i] = 0; - break; - case "SYSTEM_COMPONENTS": - case 1: - message.enableComponents[i] = 1; - break; - case "WORKLOADS": - case 2: - message.enableComponents[i] = 2; - break; - } + var message = new $root.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse(); + if (object.attachedClusters) { + if (!Array.isArray(object.attachedClusters)) + throw TypeError(".google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.attachedClusters: array expected"); + message.attachedClusters = []; + for (var i = 0; i < object.attachedClusters.length; ++i) { + if (typeof object.attachedClusters[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.attachedClusters: object expected"); + message.attachedClusters[i] = $root.google.cloud.gkemulticloud.v1.AttachedCluster.fromObject(object.attachedClusters[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a LoggingComponentConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListAttachedClustersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static - * @param {google.cloud.gkemulticloud.v1.LoggingComponentConfig} message LoggingComponentConfig + * @param {google.cloud.gkemulticloud.v1.ListAttachedClustersResponse} message ListAttachedClustersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LoggingComponentConfig.toObject = function toObject(message, options) { + ListAttachedClustersResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.enableComponents = []; - if (message.enableComponents && message.enableComponents.length) { - object.enableComponents = []; - for (var j = 0; j < message.enableComponents.length; ++j) - object.enableComponents[j] = options.enums === String ? $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; + object.attachedClusters = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.attachedClusters && message.attachedClusters.length) { + object.attachedClusters = []; + for (var j = 0; j < message.attachedClusters.length; ++j) + object.attachedClusters[j] = $root.google.cloud.gkemulticloud.v1.AttachedCluster.toObject(message.attachedClusters[j], options); } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this LoggingComponentConfig to JSON. + * Converts this ListAttachedClustersResponse to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @instance * @returns {Object.} JSON object */ - LoggingComponentConfig.prototype.toJSON = function toJSON() { + ListAttachedClustersResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LoggingComponentConfig + * Gets the default type url for ListAttachedClustersResponse * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.LoggingComponentConfig + * @memberof google.cloud.gkemulticloud.v1.ListAttachedClustersResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LoggingComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAttachedClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.LoggingComponentConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAttachedClustersResponse"; }; - /** - * Component enum. - * @name google.cloud.gkemulticloud.v1.LoggingComponentConfig.Component - * @enum {number} - * @property {number} COMPONENT_UNSPECIFIED=0 COMPONENT_UNSPECIFIED value - * @property {number} SYSTEM_COMPONENTS=1 SYSTEM_COMPONENTS value - * @property {number} WORKLOADS=2 WORKLOADS value - */ - LoggingComponentConfig.Component = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPONENT_UNSPECIFIED"] = 0; - values[valuesById[1] = "SYSTEM_COMPONENTS"] = 1; - values[valuesById[2] = "WORKLOADS"] = 2; - return values; - })(); - - return LoggingComponentConfig; + return ListAttachedClustersResponse; })(); - v1.AwsClusters = (function() { + v1.DeleteAttachedClusterRequest = (function() { /** - * Constructs a new AwsClusters service. + * Properties of a DeleteAttachedClusterRequest. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AwsClusters - * @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 + * @interface IDeleteAttachedClusterRequest + * @property {string|null} [name] DeleteAttachedClusterRequest name + * @property {boolean|null} [validateOnly] DeleteAttachedClusterRequest validateOnly + * @property {boolean|null} [allowMissing] DeleteAttachedClusterRequest allowMissing + * @property {boolean|null} [ignoreErrors] DeleteAttachedClusterRequest ignoreErrors + * @property {string|null} [etag] DeleteAttachedClusterRequest etag */ - function AwsClusters(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (AwsClusters.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AwsClusters; /** - * Creates new AwsClusters service using the specified rpc implementation. - * @function create - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @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 {AwsClusters} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new DeleteAttachedClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a DeleteAttachedClusterRequest. + * @implements IDeleteAttachedClusterRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest=} [properties] Properties to set */ - AwsClusters.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function DeleteAttachedClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|createAwsCluster}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef CreateAwsClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * DeleteAttachedClusterRequest name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @instance */ + DeleteAttachedClusterRequest.prototype.name = ""; /** - * Calls CreateAwsCluster. - * @function createAwsCluster - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * DeleteAttachedClusterRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest * @instance - * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest} request CreateAwsClusterRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AwsClusters.prototype.createAwsCluster = function createAwsCluster(request, callback) { - return this.rpcCall(createAwsCluster, $root.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAwsCluster" }); + DeleteAttachedClusterRequest.prototype.validateOnly = false; /** - * Calls CreateAwsCluster. - * @function createAwsCluster - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * DeleteAttachedClusterRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest * @instance - * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest} request CreateAwsClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + DeleteAttachedClusterRequest.prototype.allowMissing = false; /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|updateAwsCluster}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef UpdateAwsClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * DeleteAttachedClusterRequest ignoreErrors. + * @member {boolean} ignoreErrors + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @instance */ + DeleteAttachedClusterRequest.prototype.ignoreErrors = false; /** - * Calls UpdateAwsCluster. - * @function updateAwsCluster - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * DeleteAttachedClusterRequest etag. + * @member {string} etag + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest * @instance - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest} request UpdateAwsClusterRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AwsClusters.prototype.updateAwsCluster = function updateAwsCluster(request, callback) { - return this.rpcCall(updateAwsCluster, $root.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAwsCluster" }); + DeleteAttachedClusterRequest.prototype.etag = ""; /** - * Calls UpdateAwsCluster. - * @function updateAwsCluster - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest} request UpdateAwsClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new DeleteAttachedClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest} DeleteAttachedClusterRequest instance */ + DeleteAttachedClusterRequest.create = function create(properties) { + return new DeleteAttachedClusterRequest(properties); + }; /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|getAwsCluster}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef GetAwsClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkemulticloud.v1.AwsCluster} [response] AwsCluster + * Encodes the specified DeleteAttachedClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest} message DeleteAttachedClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DeleteAttachedClusterRequest.encode = function encode(message, writer) { + 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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.ignoreErrors != null && Object.hasOwnProperty.call(message, "ignoreErrors")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.ignoreErrors); + return writer; + }; /** - * Calls GetAwsCluster. - * @function getAwsCluster - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest} request GetAwsClusterRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.GetAwsClusterCallback} callback Node-style callback called with the error, if any, and AwsCluster - * @returns {undefined} - * @variation 1 + * Encodes the specified DeleteAttachedClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest} message DeleteAttachedClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AwsClusters.prototype.getAwsCluster = function getAwsCluster(request, callback) { - return this.rpcCall(getAwsCluster, $root.google.cloud.gkemulticloud.v1.GetAwsClusterRequest, $root.google.cloud.gkemulticloud.v1.AwsCluster, request, callback); - }, "name", { value: "GetAwsCluster" }); + DeleteAttachedClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetAwsCluster. - * @function getAwsCluster - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest} request GetAwsClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a DeleteAttachedClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest} DeleteAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteAttachedClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 5: { + message.ignoreErrors = reader.bool(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|listAwsClusters}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef ListAwsClustersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} [response] ListAwsClustersResponse + * Decodes a DeleteAttachedClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest} DeleteAttachedClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteAttachedClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListAwsClusters. - * @function listAwsClusters - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest} request ListAwsClustersRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClustersCallback} callback Node-style callback called with the error, if any, and ListAwsClustersResponse - * @returns {undefined} - * @variation 1 + * Verifies a DeleteAttachedClusterRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AwsClusters.prototype.listAwsClusters = function listAwsClusters(request, callback) { - return this.rpcCall(listAwsClusters, $root.google.cloud.gkemulticloud.v1.ListAwsClustersRequest, $root.google.cloud.gkemulticloud.v1.ListAwsClustersResponse, request, callback); - }, "name", { value: "ListAwsClusters" }); + DeleteAttachedClusterRequest.verify = function verify(message) { + if (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.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.ignoreErrors != null && message.hasOwnProperty("ignoreErrors")) + if (typeof message.ignoreErrors !== "boolean") + return "ignoreErrors: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; /** - * Calls ListAwsClusters. - * @function listAwsClusters - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest} request ListAwsClustersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a DeleteAttachedClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest} DeleteAttachedClusterRequest */ + DeleteAttachedClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.ignoreErrors != null) + message.ignoreErrors = Boolean(object.ignoreErrors); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|deleteAwsCluster}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef DeleteAwsClusterCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from a DeleteAttachedClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest} message DeleteAttachedClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + DeleteAttachedClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + object.allowMissing = false; + object.etag = ""; + object.ignoreErrors = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.ignoreErrors != null && message.hasOwnProperty("ignoreErrors")) + object.ignoreErrors = message.ignoreErrors; + return object; + }; /** - * Calls DeleteAwsCluster. - * @function deleteAwsCluster - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * Converts this DeleteAttachedClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest * @instance - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest} request DeleteAwsClusterRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsClusterCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AwsClusters.prototype.deleteAwsCluster = function deleteAwsCluster(request, callback) { - return this.rpcCall(deleteAwsCluster, $root.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAwsCluster" }); + DeleteAttachedClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteAwsCluster. - * @function deleteAwsCluster - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest} request DeleteAwsClusterRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for DeleteAttachedClusterRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + DeleteAttachedClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest"; + }; - /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|generateAwsAccessToken}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef GenerateAwsAccessTokenCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} [response] GenerateAwsAccessTokenResponse - */ + return DeleteAttachedClusterRequest; + })(); - /** - * Calls GenerateAwsAccessToken. - * @function generateAwsAccessToken - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest} request GenerateAwsAccessTokenRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.GenerateAwsAccessTokenCallback} callback Node-style callback called with the error, if any, and GenerateAwsAccessTokenResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(AwsClusters.prototype.generateAwsAccessToken = function generateAwsAccessToken(request, callback) { - return this.rpcCall(generateAwsAccessToken, $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest, $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse, request, callback); - }, "name", { value: "GenerateAwsAccessToken" }); + v1.GetAttachedServerConfigRequest = (function() { /** - * Calls GenerateAwsAccessToken. - * @function generateAwsAccessToken - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest} request GenerateAwsAccessTokenRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a GetAttachedServerConfigRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IGetAttachedServerConfigRequest + * @property {string|null} [name] GetAttachedServerConfigRequest name */ /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|createAwsNodePool}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef CreateAwsNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Constructs a new GetAttachedServerConfigRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a GetAttachedServerConfigRequest. + * @implements IGetAttachedServerConfigRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest=} [properties] Properties to set */ + function GetAttachedServerConfigRequest(properties) { + if (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 CreateAwsNodePool. - * @function createAwsNodePool - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * GetAttachedServerConfigRequest name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest * @instance - * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest} request CreateAwsNodePoolRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AwsClusters.prototype.createAwsNodePool = function createAwsNodePool(request, callback) { - return this.rpcCall(createAwsNodePool, $root.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAwsNodePool" }); + GetAttachedServerConfigRequest.prototype.name = ""; /** - * Calls CreateAwsNodePool. - * @function createAwsNodePool - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest} request CreateAwsNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new GetAttachedServerConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest} GetAttachedServerConfigRequest instance */ + GetAttachedServerConfigRequest.create = function create(properties) { + return new GetAttachedServerConfigRequest(properties); + }; /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|updateAwsNodePool}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef UpdateAwsNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified GetAttachedServerConfigRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest} message GetAttachedServerConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + GetAttachedServerConfigRequest.encode = function encode(message, writer) { + 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; + }; /** - * Calls UpdateAwsNodePool. - * @function updateAwsNodePool - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest} request UpdateAwsNodePoolRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified GetAttachedServerConfigRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest} message GetAttachedServerConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AwsClusters.prototype.updateAwsNodePool = function updateAwsNodePool(request, callback) { - return this.rpcCall(updateAwsNodePool, $root.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAwsNodePool" }); + GetAttachedServerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls UpdateAwsNodePool. - * @function updateAwsNodePool - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest} request UpdateAwsNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a GetAttachedServerConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest} GetAttachedServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetAttachedServerConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest(); + 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; + }; /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|getAwsNodePool}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef GetAwsNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkemulticloud.v1.AwsNodePool} [response] AwsNodePool + * Decodes a GetAttachedServerConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest} GetAttachedServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + GetAttachedServerConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetAwsNodePool. - * @function getAwsNodePool - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest} request GetAwsNodePoolRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.GetAwsNodePoolCallback} callback Node-style callback called with the error, if any, and AwsNodePool - * @returns {undefined} - * @variation 1 + * Verifies a GetAttachedServerConfigRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(AwsClusters.prototype.getAwsNodePool = function getAwsNodePool(request, callback) { - return this.rpcCall(getAwsNodePool, $root.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest, $root.google.cloud.gkemulticloud.v1.AwsNodePool, request, callback); - }, "name", { value: "GetAwsNodePool" }); + GetAttachedServerConfigRequest.verify = function verify(message) { + if (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; + }; /** - * Calls GetAwsNodePool. - * @function getAwsNodePool - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest} request GetAwsNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a GetAttachedServerConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest} GetAttachedServerConfigRequest */ + GetAttachedServerConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|listAwsNodePools}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef ListAwsNodePoolsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} [response] ListAwsNodePoolsResponse + * Creates a plain object from a GetAttachedServerConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest} message GetAttachedServerConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + GetAttachedServerConfigRequest.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; + }; /** - * Calls ListAwsNodePools. - * @function listAwsNodePools - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * Converts this GetAttachedServerConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest * @instance - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest} request ListAwsNodePoolsRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePoolsCallback} callback Node-style callback called with the error, if any, and ListAwsNodePoolsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(AwsClusters.prototype.listAwsNodePools = function listAwsNodePools(request, callback) { - return this.rpcCall(listAwsNodePools, $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest, $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse, request, callback); - }, "name", { value: "ListAwsNodePools" }); + GetAttachedServerConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListAwsNodePools. - * @function listAwsNodePools - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @instance - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest} request ListAwsNodePoolsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for GetAttachedServerConfigRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + GetAttachedServerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest"; + }; + + return GetAttachedServerConfigRequest; + })(); + + v1.AwsCluster = (function() { /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|deleteAwsNodePool}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef DeleteAwsNodePoolCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Properties of an AwsCluster. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsCluster + * @property {string|null} [name] AwsCluster name + * @property {string|null} [description] AwsCluster description + * @property {google.cloud.gkemulticloud.v1.IAwsClusterNetworking|null} [networking] AwsCluster networking + * @property {string|null} [awsRegion] AwsCluster awsRegion + * @property {google.cloud.gkemulticloud.v1.IAwsControlPlane|null} [controlPlane] AwsCluster controlPlane + * @property {google.cloud.gkemulticloud.v1.IAwsAuthorization|null} [authorization] AwsCluster authorization + * @property {google.cloud.gkemulticloud.v1.AwsCluster.State|null} [state] AwsCluster state + * @property {string|null} [endpoint] AwsCluster endpoint + * @property {string|null} [uid] AwsCluster uid + * @property {boolean|null} [reconciling] AwsCluster reconciling + * @property {google.protobuf.ITimestamp|null} [createTime] AwsCluster createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AwsCluster updateTime + * @property {string|null} [etag] AwsCluster etag + * @property {Object.|null} [annotations] AwsCluster annotations + * @property {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] AwsCluster workloadIdentityConfig + * @property {string|null} [clusterCaCertificate] AwsCluster clusterCaCertificate + * @property {google.cloud.gkemulticloud.v1.IFleet|null} [fleet] AwsCluster fleet + * @property {google.cloud.gkemulticloud.v1.ILoggingConfig|null} [loggingConfig] AwsCluster loggingConfig + * @property {Array.|null} [errors] AwsCluster errors + * @property {google.cloud.gkemulticloud.v1.IMonitoringConfig|null} [monitoringConfig] AwsCluster monitoringConfig */ /** - * Calls DeleteAwsNodePool. - * @function deleteAwsNodePool - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * Constructs a new AwsCluster. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsCluster. + * @implements IAwsCluster + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsCluster=} [properties] Properties to set + */ + function AwsCluster(properties) { + this.annotations = {}; + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsCluster name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest} request DeleteAwsNodePoolRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsNodePoolCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AwsClusters.prototype.deleteAwsNodePool = function deleteAwsNodePool(request, callback) { - return this.rpcCall(deleteAwsNodePool, $root.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAwsNodePool" }); + AwsCluster.prototype.name = ""; /** - * Calls DeleteAwsNodePool. - * @function deleteAwsNodePool - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * AwsCluster description. + * @member {string} description + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest} request DeleteAwsNodePoolRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AwsCluster.prototype.description = ""; /** - * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|getAwsServerConfig}. - * @memberof google.cloud.gkemulticloud.v1.AwsClusters - * @typedef GetAwsServerConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkemulticloud.v1.AwsServerConfig} [response] AwsServerConfig + * AwsCluster networking. + * @member {google.cloud.gkemulticloud.v1.IAwsClusterNetworking|null|undefined} networking + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance */ + AwsCluster.prototype.networking = null; /** - * Calls GetAwsServerConfig. - * @function getAwsServerConfig - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * AwsCluster awsRegion. + * @member {string} awsRegion + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance - * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest} request GetAwsServerConfigRequest message or plain object - * @param {google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfigCallback} callback Node-style callback called with the error, if any, and AwsServerConfig - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(AwsClusters.prototype.getAwsServerConfig = function getAwsServerConfig(request, callback) { - return this.rpcCall(getAwsServerConfig, $root.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest, $root.google.cloud.gkemulticloud.v1.AwsServerConfig, request, callback); - }, "name", { value: "GetAwsServerConfig" }); + AwsCluster.prototype.awsRegion = ""; /** - * Calls GetAwsServerConfig. - * @function getAwsServerConfig - * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * AwsCluster controlPlane. + * @member {google.cloud.gkemulticloud.v1.IAwsControlPlane|null|undefined} controlPlane + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance - * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest} request GetAwsServerConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AwsCluster.prototype.controlPlane = null; - return AwsClusters; - })(); + /** + * AwsCluster authorization. + * @member {google.cloud.gkemulticloud.v1.IAwsAuthorization|null|undefined} authorization + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.authorization = null; - v1.CreateAwsClusterRequest = (function() { + /** + * AwsCluster state. + * @member {google.cloud.gkemulticloud.v1.AwsCluster.State} state + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.state = 0; /** - * Properties of a CreateAwsClusterRequest. - * @memberof google.cloud.gkemulticloud.v1 - * @interface ICreateAwsClusterRequest - * @property {string|null} [parent] CreateAwsClusterRequest parent - * @property {google.cloud.gkemulticloud.v1.IAwsCluster|null} [awsCluster] CreateAwsClusterRequest awsCluster - * @property {string|null} [awsClusterId] CreateAwsClusterRequest awsClusterId - * @property {boolean|null} [validateOnly] CreateAwsClusterRequest validateOnly + * AwsCluster endpoint. + * @member {string} endpoint + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance */ + AwsCluster.prototype.endpoint = ""; /** - * Constructs a new CreateAwsClusterRequest. - * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a CreateAwsClusterRequest. - * @implements ICreateAwsClusterRequest - * @constructor - * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest=} [properties] Properties to set + * AwsCluster uid. + * @member {string} uid + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance */ - function CreateAwsClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + AwsCluster.prototype.uid = ""; /** - * CreateAwsClusterRequest parent. - * @member {string} parent - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * AwsCluster reconciling. + * @member {boolean} reconciling + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance */ - CreateAwsClusterRequest.prototype.parent = ""; + AwsCluster.prototype.reconciling = false; /** - * CreateAwsClusterRequest awsCluster. - * @member {google.cloud.gkemulticloud.v1.IAwsCluster|null|undefined} awsCluster - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * AwsCluster createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance */ - CreateAwsClusterRequest.prototype.awsCluster = null; + AwsCluster.prototype.createTime = null; /** - * CreateAwsClusterRequest awsClusterId. - * @member {string} awsClusterId - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * AwsCluster updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance */ - CreateAwsClusterRequest.prototype.awsClusterId = ""; + AwsCluster.prototype.updateTime = null; /** - * CreateAwsClusterRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * AwsCluster etag. + * @member {string} etag + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance */ - CreateAwsClusterRequest.prototype.validateOnly = false; + AwsCluster.prototype.etag = ""; /** - * Creates a new CreateAwsClusterRequest instance using the specified properties. + * AwsCluster annotations. + * @member {Object.} annotations + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.annotations = $util.emptyObject; + + /** + * AwsCluster workloadIdentityConfig. + * @member {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null|undefined} workloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.workloadIdentityConfig = null; + + /** + * AwsCluster clusterCaCertificate. + * @member {string} clusterCaCertificate + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.clusterCaCertificate = ""; + + /** + * AwsCluster fleet. + * @member {google.cloud.gkemulticloud.v1.IFleet|null|undefined} fleet + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.fleet = null; + + /** + * AwsCluster loggingConfig. + * @member {google.cloud.gkemulticloud.v1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.loggingConfig = null; + + /** + * AwsCluster errors. + * @member {Array.} errors + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.errors = $util.emptyArray; + + /** + * AwsCluster monitoringConfig. + * @member {google.cloud.gkemulticloud.v1.IMonitoringConfig|null|undefined} monitoringConfig + * @memberof google.cloud.gkemulticloud.v1.AwsCluster + * @instance + */ + AwsCluster.prototype.monitoringConfig = null; + + /** + * Creates a new AwsCluster instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static - * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} CreateAwsClusterRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsCluster=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsCluster} AwsCluster instance */ - CreateAwsClusterRequest.create = function create(properties) { - return new CreateAwsClusterRequest(properties); + AwsCluster.create = function create(properties) { + return new AwsCluster(properties); }; /** - * Encodes the specified CreateAwsClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.verify|verify} messages. + * Encodes the specified AwsCluster message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsCluster.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static - * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest} message CreateAwsClusterRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsCluster} message AwsCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAwsClusterRequest.encode = function encode(message, writer) { + AwsCluster.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.awsCluster != null && Object.hasOwnProperty.call(message, "awsCluster")) - $root.google.cloud.gkemulticloud.v1.AwsCluster.encode(message.awsCluster, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.awsClusterId != null && Object.hasOwnProperty.call(message, "awsClusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.awsClusterId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.networking != null && Object.hasOwnProperty.call(message, "networking")) + $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.encode(message.networking, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.awsRegion != null && Object.hasOwnProperty.call(message, "awsRegion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.awsRegion); + if (message.controlPlane != null && Object.hasOwnProperty.call(message, "controlPlane")) + $root.google.cloud.gkemulticloud.v1.AwsControlPlane.encode(message.controlPlane, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpoint); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.uid); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.reconciling); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) + $root.google.cloud.gkemulticloud.v1.AwsAuthorization.encode(message.authorization, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.workloadIdentityConfig != null && Object.hasOwnProperty.call(message, "workloadIdentityConfig")) + $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.clusterCaCertificate != null && Object.hasOwnProperty.call(message, "clusterCaCertificate")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.clusterCaCertificate); + if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) + $root.google.cloud.gkemulticloud.v1.Fleet.encode(message.fleet, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.cloud.gkemulticloud.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.gkemulticloud.v1.AwsClusterError.encode(message.errors[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) + $root.google.cloud.gkemulticloud.v1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateAwsClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.verify|verify} messages. + * Encodes the specified AwsCluster message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsCluster.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static - * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest} message CreateAwsClusterRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsCluster} message AwsCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAwsClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsCluster.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAwsClusterRequest message from the specified reader or buffer. + * Decodes an AwsCluster message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} CreateAwsClusterRequest + * @returns {google.cloud.gkemulticloud.v1.AwsCluster} AwsCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAwsClusterRequest.decode = function decode(reader, length) { + AwsCluster.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsCluster(), 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.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.decode(reader, reader.uint32()); + message.description = reader.string(); break; } case 3: { - message.awsClusterId = reader.string(); + message.networking = $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.decode(reader, reader.uint32()); break; } case 4: { - message.validateOnly = reader.bool(); + message.awsRegion = reader.string(); + break; + } + case 5: { + message.controlPlane = $root.google.cloud.gkemulticloud.v1.AwsControlPlane.decode(reader, reader.uint32()); + break; + } + case 15: { + message.authorization = $root.google.cloud.gkemulticloud.v1.AwsAuthorization.decode(reader, reader.uint32()); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + message.endpoint = reader.string(); + break; + } + case 9: { + message.uid = reader.string(); + break; + } + case 10: { + message.reconciling = reader.bool(); + break; + } + case 11: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.etag = reader.string(); + break; + } + case 14: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 16: { + message.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.decode(reader, reader.uint32()); + break; + } + case 17: { + message.clusterCaCertificate = reader.string(); + break; + } + case 18: { + message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.decode(reader, reader.uint32()); + break; + } + case 19: { + message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.decode(reader, reader.uint32()); + break; + } + case 20: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.gkemulticloud.v1.AwsClusterError.decode(reader, reader.uint32())); + break; + } + case 21: { + message.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.decode(reader, reader.uint32()); break; } default: @@ -8026,412 +7620,437 @@ }; /** - * Decodes a CreateAwsClusterRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsCluster message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} CreateAwsClusterRequest + * @returns {google.cloud.gkemulticloud.v1.AwsCluster} AwsCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAwsClusterRequest.decodeDelimited = function decodeDelimited(reader) { + AwsCluster.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAwsClusterRequest message. + * Verifies an AwsCluster message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAwsClusterRequest.verify = function verify(message) { + AwsCluster.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.awsCluster != null && message.hasOwnProperty("awsCluster")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsCluster.verify(message.awsCluster); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.networking != null && message.hasOwnProperty("networking")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify(message.networking); if (error) - return "awsCluster." + error; + return "networking." + error; } - if (message.awsClusterId != null && message.hasOwnProperty("awsClusterId")) - if (!$util.isString(message.awsClusterId)) - return "awsClusterId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateAwsClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} CreateAwsClusterRequest - */ - CreateAwsClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) - return object; - var message = new $root.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.awsCluster != null) { - if (typeof object.awsCluster !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.awsCluster: object expected"); - message.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.fromObject(object.awsCluster); + if (message.awsRegion != null && message.hasOwnProperty("awsRegion")) + if (!$util.isString(message.awsRegion)) + return "awsRegion: string expected"; + if (message.controlPlane != null && message.hasOwnProperty("controlPlane")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsControlPlane.verify(message.controlPlane); + if (error) + return "controlPlane." + error; } - if (object.awsClusterId != null) - message.awsClusterId = String(object.awsClusterId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateAwsClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest - * @static - * @param {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} message CreateAwsClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateAwsClusterRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.awsCluster = null; - object.awsClusterId = ""; - object.validateOnly = false; + if (message.authorization != null && message.hasOwnProperty("authorization")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsAuthorization.verify(message.authorization); + if (error) + return "authorization." + error; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) - object.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.toObject(message.awsCluster, options); - if (message.awsClusterId != null && message.hasOwnProperty("awsClusterId")) - object.awsClusterId = message.awsClusterId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateAwsClusterRequest to JSON. - * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest - * @instance - * @returns {Object.} JSON object - */ - CreateAwsClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateAwsClusterRequest - * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateAwsClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.CreateAwsClusterRequest"; - }; - - return CreateAwsClusterRequest; - })(); - - v1.UpdateAwsClusterRequest = (function() { - - /** - * Properties of an UpdateAwsClusterRequest. - * @memberof google.cloud.gkemulticloud.v1 - * @interface IUpdateAwsClusterRequest - * @property {google.cloud.gkemulticloud.v1.IAwsCluster|null} [awsCluster] UpdateAwsClusterRequest awsCluster - * @property {boolean|null} [validateOnly] UpdateAwsClusterRequest validateOnly - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAwsClusterRequest updateMask - */ - - /** - * Constructs a new UpdateAwsClusterRequest. - * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an UpdateAwsClusterRequest. - * @implements IUpdateAwsClusterRequest - * @constructor - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest=} [properties] Properties to set - */ - function UpdateAwsClusterRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateAwsClusterRequest awsCluster. - * @member {google.cloud.gkemulticloud.v1.IAwsCluster|null|undefined} awsCluster - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @instance - */ - UpdateAwsClusterRequest.prototype.awsCluster = null; - - /** - * UpdateAwsClusterRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @instance - */ - UpdateAwsClusterRequest.prototype.validateOnly = false; - - /** - * UpdateAwsClusterRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @instance - */ - UpdateAwsClusterRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateAwsClusterRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @static - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} UpdateAwsClusterRequest instance - */ - UpdateAwsClusterRequest.create = function create(properties) { - return new UpdateAwsClusterRequest(properties); - }; - - /** - * Encodes the specified UpdateAwsClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @static - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest} message UpdateAwsClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAwsClusterRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.awsCluster != null && Object.hasOwnProperty.call(message, "awsCluster")) - $root.google.cloud.gkemulticloud.v1.AwsCluster.encode(message.awsCluster, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateAwsClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @static - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest} message UpdateAwsClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAwsClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateAwsClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} UpdateAwsClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAwsClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.decode(reader, reader.uint32()); - break; - } - case 2: { - message.validateOnly = reader.bool(); - break; - } - case 4: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - reader.skipType(tag & 7); + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: break; } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - return message; - }; - - /** - * Decodes an UpdateAwsClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} UpdateAwsClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAwsClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateAwsClusterRequest message. - * @function verify - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateAwsClusterRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsCluster.verify(message.awsCluster); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "awsCluster." + error; + return "updateTime." + error; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: 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.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify(message.workloadIdentityConfig); if (error) - return "updateMask." + error; + return "workloadIdentityConfig." + error; + } + if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) + if (!$util.isString(message.clusterCaCertificate)) + return "clusterCaCertificate: string expected"; + if (message.fleet != null && message.hasOwnProperty("fleet")) { + var error = $root.google.cloud.gkemulticloud.v1.Fleet.verify(message.fleet); + if (error) + return "fleet." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AwsClusterError.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.verify(message.monitoringConfig); + if (error) + return "monitoringConfig." + error; } return null; }; /** - * Creates an UpdateAwsClusterRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsCluster message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} UpdateAwsClusterRequest + * @returns {google.cloud.gkemulticloud.v1.AwsCluster} AwsCluster */ - UpdateAwsClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) + AwsCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsCluster) return object; - var message = new $root.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest(); - if (object.awsCluster != null) { - if (typeof object.awsCluster !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.awsCluster: object expected"); - message.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.fromObject(object.awsCluster); + var message = new $root.google.cloud.gkemulticloud.v1.AwsCluster(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.networking != null) { + if (typeof object.networking !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.networking: object expected"); + message.networking = $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.fromObject(object.networking); } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.awsRegion != null) + message.awsRegion = String(object.awsRegion); + if (object.controlPlane != null) { + if (typeof object.controlPlane !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.controlPlane: object expected"); + message.controlPlane = $root.google.cloud.gkemulticloud.v1.AwsControlPlane.fromObject(object.controlPlane); + } + if (object.authorization != null) { + if (typeof object.authorization !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.authorization: object expected"); + message.authorization = $root.google.cloud.gkemulticloud.v1.AwsAuthorization.fromObject(object.authorization); + } + 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 "PROVISIONING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "RECONCILING": + case 3: + message.state = 3; + break; + case "STOPPING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + case "DEGRADED": + case 6: + message.state = 6; + break; + } + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.uid != null) + message.uid = String(object.uid); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.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.gkemulticloud.v1.AwsCluster.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.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.workloadIdentityConfig != null) { + if (typeof object.workloadIdentityConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.workloadIdentityConfig: object expected"); + message.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.fromObject(object.workloadIdentityConfig); + } + if (object.clusterCaCertificate != null) + message.clusterCaCertificate = String(object.clusterCaCertificate); + if (object.fleet != null) { + if (typeof object.fleet !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.fleet: object expected"); + message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.fromObject(object.fleet); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.loggingConfig: object expected"); + message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.fromObject(object.loggingConfig); + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.errors: object expected"); + message.errors[i] = $root.google.cloud.gkemulticloud.v1.AwsClusterError.fromObject(object.errors[i]); + } + } + if (object.monitoringConfig != null) { + if (typeof object.monitoringConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsCluster.monitoringConfig: object expected"); + message.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.fromObject(object.monitoringConfig); } return message; }; /** - * Creates a plain object from an UpdateAwsClusterRequest message. Also converts values to other types if specified. + * Creates a plain object from an AwsCluster message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static - * @param {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} message UpdateAwsClusterRequest + * @param {google.cloud.gkemulticloud.v1.AwsCluster} message AwsCluster * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAwsClusterRequest.toObject = function toObject(message, options) { + AwsCluster.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.objects || options.defaults) + object.annotations = {}; if (options.defaults) { - object.awsCluster = null; - object.validateOnly = false; - object.updateMask = null; + object.name = ""; + object.description = ""; + object.networking = null; + object.awsRegion = ""; + object.controlPlane = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.endpoint = ""; + object.uid = ""; + object.reconciling = false; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.authorization = null; + object.workloadIdentityConfig = null; + object.clusterCaCertificate = ""; + object.fleet = null; + object.loggingConfig = null; + object.monitoringConfig = null; } - if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) - object.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.toObject(message.awsCluster, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.networking != null && message.hasOwnProperty("networking")) + object.networking = $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking.toObject(message.networking, options); + if (message.awsRegion != null && message.hasOwnProperty("awsRegion")) + object.awsRegion = message.awsRegion; + if (message.controlPlane != null && message.hasOwnProperty("controlPlane")) + object.controlPlane = $root.google.cloud.gkemulticloud.v1.AwsControlPlane.toObject(message.controlPlane, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AwsCluster.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AwsCluster.State[message.state] : message.state; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + 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; + 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.authorization != null && message.hasOwnProperty("authorization")) + object.authorization = $root.google.cloud.gkemulticloud.v1.AwsAuthorization.toObject(message.authorization, options); + if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) + object.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.toObject(message.workloadIdentityConfig, options); + if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) + object.clusterCaCertificate = message.clusterCaCertificate; + if (message.fleet != null && message.hasOwnProperty("fleet")) + object.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.toObject(message.fleet, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.toObject(message.loggingConfig, options); + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.gkemulticloud.v1.AwsClusterError.toObject(message.errors[j], options); + } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) + object.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.toObject(message.monitoringConfig, options); return object; }; /** - * Converts this UpdateAwsClusterRequest to JSON. + * Converts this AwsCluster to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @instance * @returns {Object.} JSON object */ - UpdateAwsClusterRequest.prototype.toJSON = function toJSON() { + AwsCluster.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateAwsClusterRequest + * Gets the default type url for AwsCluster * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsCluster * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateAwsClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsCluster"; }; - return UpdateAwsClusterRequest; + /** + * State enum. + * @name google.cloud.gkemulticloud.v1.AwsCluster.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PROVISIONING=1 PROVISIONING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} RECONCILING=3 RECONCILING value + * @property {number} STOPPING=4 STOPPING value + * @property {number} ERROR=5 ERROR value + * @property {number} DEGRADED=6 DEGRADED value + */ + AwsCluster.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "RECONCILING"] = 3; + values[valuesById[4] = "STOPPING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + values[valuesById[6] = "DEGRADED"] = 6; + return values; + })(); + + return AwsCluster; })(); - v1.GetAwsClusterRequest = (function() { + v1.AwsControlPlane = (function() { /** - * Properties of a GetAwsClusterRequest. + * Properties of an AwsControlPlane. * @memberof google.cloud.gkemulticloud.v1 - * @interface IGetAwsClusterRequest - * @property {string|null} [name] GetAwsClusterRequest name + * @interface IAwsControlPlane + * @property {string|null} [version] AwsControlPlane version + * @property {string|null} [instanceType] AwsControlPlane instanceType + * @property {google.cloud.gkemulticloud.v1.IAwsSshConfig|null} [sshConfig] AwsControlPlane sshConfig + * @property {Array.|null} [subnetIds] AwsControlPlane subnetIds + * @property {Array.|null} [securityGroupIds] AwsControlPlane securityGroupIds + * @property {string|null} [iamInstanceProfile] AwsControlPlane iamInstanceProfile + * @property {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null} [rootVolume] AwsControlPlane rootVolume + * @property {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null} [mainVolume] AwsControlPlane mainVolume + * @property {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption|null} [databaseEncryption] AwsControlPlane databaseEncryption + * @property {Object.|null} [tags] AwsControlPlane tags + * @property {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication|null} [awsServicesAuthentication] AwsControlPlane awsServicesAuthentication + * @property {google.cloud.gkemulticloud.v1.IAwsProxyConfig|null} [proxyConfig] AwsControlPlane proxyConfig + * @property {google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null} [configEncryption] AwsControlPlane configEncryption + * @property {google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null} [instancePlacement] AwsControlPlane instancePlacement */ /** - * Constructs a new GetAwsClusterRequest. + * Constructs a new AwsControlPlane. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a GetAwsClusterRequest. - * @implements IGetAwsClusterRequest + * @classdesc Represents an AwsControlPlane. + * @implements IAwsControlPlane * @constructor - * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsControlPlane=} [properties] Properties to set */ - function GetAwsClusterRequest(properties) { + function AwsControlPlane(properties) { + this.subnetIds = []; + this.securityGroupIds = []; + this.tags = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8439,308 +8058,283 @@ } /** - * GetAwsClusterRequest name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * AwsControlPlane version. + * @member {string} version + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @instance */ - GetAwsClusterRequest.prototype.name = ""; - - /** - * Creates a new GetAwsClusterRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} GetAwsClusterRequest instance - */ - GetAwsClusterRequest.create = function create(properties) { - return new GetAwsClusterRequest(properties); - }; - - /** - * Encodes the specified GetAwsClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsClusterRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest} message GetAwsClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetAwsClusterRequest.encode = function encode(message, writer) { - 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; - }; + AwsControlPlane.prototype.version = ""; /** - * Encodes the specified GetAwsClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsClusterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest} message GetAwsClusterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * AwsControlPlane instanceType. + * @member {string} instanceType + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ - GetAwsClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + AwsControlPlane.prototype.instanceType = ""; /** - * Decodes a GetAwsClusterRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} GetAwsClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * AwsControlPlane sshConfig. + * @member {google.cloud.gkemulticloud.v1.IAwsSshConfig|null|undefined} sshConfig + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ - GetAwsClusterRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GetAwsClusterRequest(); - 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; - }; + AwsControlPlane.prototype.sshConfig = null; /** - * Decodes a GetAwsClusterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} GetAwsClusterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * AwsControlPlane subnetIds. + * @member {Array.} subnetIds + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ - GetAwsClusterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + AwsControlPlane.prototype.subnetIds = $util.emptyArray; /** - * Verifies a GetAwsClusterRequest message. - * @function verify - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * AwsControlPlane securityGroupIds. + * @member {Array.} securityGroupIds + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ - GetAwsClusterRequest.verify = function verify(message) { - if (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; - }; + AwsControlPlane.prototype.securityGroupIds = $util.emptyArray; /** - * Creates a GetAwsClusterRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} GetAwsClusterRequest + * AwsControlPlane iamInstanceProfile. + * @member {string} iamInstanceProfile + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ - GetAwsClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.GetAwsClusterRequest) - return object; - var message = new $root.google.cloud.gkemulticloud.v1.GetAwsClusterRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + AwsControlPlane.prototype.iamInstanceProfile = ""; /** - * Creates a plain object from a GetAwsClusterRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} message GetAwsClusterRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * AwsControlPlane rootVolume. + * @member {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null|undefined} rootVolume + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ - GetAwsClusterRequest.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; - }; + AwsControlPlane.prototype.rootVolume = null; /** - * Converts this GetAwsClusterRequest to JSON. - * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * AwsControlPlane mainVolume. + * @member {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null|undefined} mainVolume + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @instance - * @returns {Object.} JSON object */ - GetAwsClusterRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + AwsControlPlane.prototype.mainVolume = null; /** - * Gets the default type url for GetAwsClusterRequest - * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * AwsControlPlane databaseEncryption. + * @member {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption|null|undefined} databaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ - GetAwsClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GetAwsClusterRequest"; - }; - - return GetAwsClusterRequest; - })(); - - v1.ListAwsClustersRequest = (function() { + AwsControlPlane.prototype.databaseEncryption = null; /** - * Properties of a ListAwsClustersRequest. - * @memberof google.cloud.gkemulticloud.v1 - * @interface IListAwsClustersRequest - * @property {string|null} [parent] ListAwsClustersRequest parent - * @property {number|null} [pageSize] ListAwsClustersRequest pageSize - * @property {string|null} [pageToken] ListAwsClustersRequest pageToken + * AwsControlPlane tags. + * @member {Object.} tags + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ + AwsControlPlane.prototype.tags = $util.emptyObject; /** - * Constructs a new ListAwsClustersRequest. - * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a ListAwsClustersRequest. - * @implements IListAwsClustersRequest - * @constructor - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest=} [properties] Properties to set + * AwsControlPlane awsServicesAuthentication. + * @member {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication|null|undefined} awsServicesAuthentication + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane + * @instance */ - function ListAwsClustersRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + AwsControlPlane.prototype.awsServicesAuthentication = null; /** - * ListAwsClustersRequest parent. - * @member {string} parent - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * AwsControlPlane proxyConfig. + * @member {google.cloud.gkemulticloud.v1.IAwsProxyConfig|null|undefined} proxyConfig + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @instance */ - ListAwsClustersRequest.prototype.parent = ""; + AwsControlPlane.prototype.proxyConfig = null; /** - * ListAwsClustersRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * AwsControlPlane configEncryption. + * @member {google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null|undefined} configEncryption + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @instance */ - ListAwsClustersRequest.prototype.pageSize = 0; + AwsControlPlane.prototype.configEncryption = null; /** - * ListAwsClustersRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * AwsControlPlane instancePlacement. + * @member {google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null|undefined} instancePlacement + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @instance */ - ListAwsClustersRequest.prototype.pageToken = ""; + AwsControlPlane.prototype.instancePlacement = null; /** - * Creates a new ListAwsClustersRequest instance using the specified properties. + * Creates a new AwsControlPlane instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} ListAwsClustersRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsControlPlane=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsControlPlane} AwsControlPlane instance */ - ListAwsClustersRequest.create = function create(properties) { - return new ListAwsClustersRequest(properties); + AwsControlPlane.create = function create(properties) { + return new AwsControlPlane(properties); }; /** - * Encodes the specified ListAwsClustersRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsClustersRequest.verify|verify} messages. + * Encodes the specified AwsControlPlane message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsControlPlane.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest} message ListAwsClustersRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsControlPlane} message AwsControlPlane message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAwsClustersRequest.encode = function encode(message, writer) { + AwsControlPlane.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.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.instanceType != null && Object.hasOwnProperty.call(message, "instanceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceType); + if (message.subnetIds != null && message.subnetIds.length) + for (var i = 0; i < message.subnetIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subnetIds[i]); + if (message.securityGroupIds != null && message.securityGroupIds.length) + for (var i = 0; i < message.securityGroupIds.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.securityGroupIds[i]); + if (message.iamInstanceProfile != null && Object.hasOwnProperty.call(message, "iamInstanceProfile")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.iamInstanceProfile); + if (message.rootVolume != null && Object.hasOwnProperty.call(message, "rootVolume")) + $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.encode(message.rootVolume, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.mainVolume != null && Object.hasOwnProperty.call(message, "mainVolume")) + $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.encode(message.mainVolume, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.databaseEncryption != null && Object.hasOwnProperty.call(message, "databaseEncryption")) + $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.encode(message.databaseEncryption, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); + if (message.awsServicesAuthentication != null && Object.hasOwnProperty.call(message, "awsServicesAuthentication")) + $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.encode(message.awsServicesAuthentication, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.sshConfig != null && Object.hasOwnProperty.call(message, "sshConfig")) + $root.google.cloud.gkemulticloud.v1.AwsSshConfig.encode(message.sshConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.proxyConfig != null && Object.hasOwnProperty.call(message, "proxyConfig")) + $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.encode(message.proxyConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.configEncryption != null && Object.hasOwnProperty.call(message, "configEncryption")) + $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.encode(message.configEncryption, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.instancePlacement != null && Object.hasOwnProperty.call(message, "instancePlacement")) + $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.encode(message.instancePlacement, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAwsClustersRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsClustersRequest.verify|verify} messages. + * Encodes the specified AwsControlPlane message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsControlPlane.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest} message ListAwsClustersRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsControlPlane} message AwsControlPlane message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAwsClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsControlPlane.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAwsClustersRequest message from the specified reader or buffer. + * Decodes an AwsControlPlane message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} ListAwsClustersRequest + * @returns {google.cloud.gkemulticloud.v1.AwsControlPlane} AwsControlPlane * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAwsClustersRequest.decode = function decode(reader, length) { + AwsControlPlane.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAwsClustersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsControlPlane(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.version = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.instanceType = reader.string(); break; } - case 3: { - message.pageToken = reader.string(); + case 14: { + message.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.subnetIds && message.subnetIds.length)) + message.subnetIds = []; + message.subnetIds.push(reader.string()); + break; + } + case 5: { + if (!(message.securityGroupIds && message.securityGroupIds.length)) + message.securityGroupIds = []; + message.securityGroupIds.push(reader.string()); + break; + } + case 7: { + message.iamInstanceProfile = reader.string(); + break; + } + case 8: { + message.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.decode(reader, reader.uint32()); + break; + } + case 9: { + message.mainVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.decode(reader, reader.uint32()); + break; + } + case 10: { + message.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.decode(reader, reader.uint32()); + break; + } + case 11: { + if (message.tags === $util.emptyObject) + message.tags = {}; + 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.tags[key] = value; + break; + } + case 12: { + message.awsServicesAuthentication = $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.decode(reader, reader.uint32()); + break; + } + case 16: { + message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.decode(reader, reader.uint32()); + break; + } + case 17: { + message.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.decode(reader, reader.uint32()); + break; + } + case 18: { + message.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.decode(reader, reader.uint32()); break; } default: @@ -8752,141 +8346,309 @@ }; /** - * Decodes a ListAwsClustersRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsControlPlane message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} ListAwsClustersRequest + * @returns {google.cloud.gkemulticloud.v1.AwsControlPlane} AwsControlPlane * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAwsClustersRequest.decodeDelimited = function decodeDelimited(reader) { + AwsControlPlane.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAwsClustersRequest message. + * Verifies an AwsControlPlane message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAwsClustersRequest.verify = function verify(message) { + AwsControlPlane.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.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.instanceType != null && message.hasOwnProperty("instanceType")) + if (!$util.isString(message.instanceType)) + return "instanceType: string expected"; + if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.verify(message.sshConfig); + if (error) + return "sshConfig." + error; + } + if (message.subnetIds != null && message.hasOwnProperty("subnetIds")) { + if (!Array.isArray(message.subnetIds)) + return "subnetIds: array expected"; + for (var i = 0; i < message.subnetIds.length; ++i) + if (!$util.isString(message.subnetIds[i])) + return "subnetIds: string[] expected"; + } + if (message.securityGroupIds != null && message.hasOwnProperty("securityGroupIds")) { + if (!Array.isArray(message.securityGroupIds)) + return "securityGroupIds: array expected"; + for (var i = 0; i < message.securityGroupIds.length; ++i) + if (!$util.isString(message.securityGroupIds[i])) + return "securityGroupIds: string[] expected"; + } + if (message.iamInstanceProfile != null && message.hasOwnProperty("iamInstanceProfile")) + if (!$util.isString(message.iamInstanceProfile)) + return "iamInstanceProfile: string expected"; + if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify(message.rootVolume); + if (error) + return "rootVolume." + error; + } + if (message.mainVolume != null && message.hasOwnProperty("mainVolume")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify(message.mainVolume); + if (error) + return "mainVolume." + error; + } + if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify(message.databaseEncryption); + if (error) + return "databaseEncryption." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!$util.isObject(message.tags)) + return "tags: object expected"; + var key = Object.keys(message.tags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.tags[key[i]])) + return "tags: string{k:string} expected"; + } + if (message.awsServicesAuthentication != null && message.hasOwnProperty("awsServicesAuthentication")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify(message.awsServicesAuthentication); + if (error) + return "awsServicesAuthentication." + error; + } + if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.verify(message.proxyConfig); + if (error) + return "proxyConfig." + error; + } + if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify(message.configEncryption); + if (error) + return "configEncryption." + error; + } + if (message.instancePlacement != null && message.hasOwnProperty("instancePlacement")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify(message.instancePlacement); + if (error) + return "instancePlacement." + error; + } return null; }; /** - * Creates a ListAwsClustersRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsControlPlane message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} ListAwsClustersRequest + * @returns {google.cloud.gkemulticloud.v1.AwsControlPlane} AwsControlPlane */ - ListAwsClustersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAwsClustersRequest) + AwsControlPlane.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsControlPlane) return object; - var message = new $root.google.cloud.gkemulticloud.v1.ListAwsClustersRequest(); - 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); + var message = new $root.google.cloud.gkemulticloud.v1.AwsControlPlane(); + if (object.version != null) + message.version = String(object.version); + if (object.instanceType != null) + message.instanceType = String(object.instanceType); + if (object.sshConfig != null) { + if (typeof object.sshConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.sshConfig: object expected"); + message.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.fromObject(object.sshConfig); + } + if (object.subnetIds) { + if (!Array.isArray(object.subnetIds)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.subnetIds: array expected"); + message.subnetIds = []; + for (var i = 0; i < object.subnetIds.length; ++i) + message.subnetIds[i] = String(object.subnetIds[i]); + } + if (object.securityGroupIds) { + if (!Array.isArray(object.securityGroupIds)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.securityGroupIds: array expected"); + message.securityGroupIds = []; + for (var i = 0; i < object.securityGroupIds.length; ++i) + message.securityGroupIds[i] = String(object.securityGroupIds[i]); + } + if (object.iamInstanceProfile != null) + message.iamInstanceProfile = String(object.iamInstanceProfile); + if (object.rootVolume != null) { + if (typeof object.rootVolume !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.rootVolume: object expected"); + message.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.fromObject(object.rootVolume); + } + if (object.mainVolume != null) { + if (typeof object.mainVolume !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.mainVolume: object expected"); + message.mainVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.fromObject(object.mainVolume); + } + if (object.databaseEncryption != null) { + if (typeof object.databaseEncryption !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.databaseEncryption: object expected"); + message.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.fromObject(object.databaseEncryption); + } + if (object.tags) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.tags: object expected"); + message.tags = {}; + for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) + message.tags[keys[i]] = String(object.tags[keys[i]]); + } + if (object.awsServicesAuthentication != null) { + if (typeof object.awsServicesAuthentication !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.awsServicesAuthentication: object expected"); + message.awsServicesAuthentication = $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.fromObject(object.awsServicesAuthentication); + } + if (object.proxyConfig != null) { + if (typeof object.proxyConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.proxyConfig: object expected"); + message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.fromObject(object.proxyConfig); + } + if (object.configEncryption != null) { + if (typeof object.configEncryption !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.configEncryption: object expected"); + message.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.fromObject(object.configEncryption); + } + if (object.instancePlacement != null) { + if (typeof object.instancePlacement !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsControlPlane.instancePlacement: object expected"); + message.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.fromObject(object.instancePlacement); + } return message; }; /** - * Creates a plain object from a ListAwsClustersRequest message. Also converts values to other types if specified. + * Creates a plain object from an AwsControlPlane message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static - * @param {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} message ListAwsClustersRequest + * @param {google.cloud.gkemulticloud.v1.AwsControlPlane} message AwsControlPlane * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAwsClustersRequest.toObject = function toObject(message, options) { + AwsControlPlane.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.subnetIds = []; + object.securityGroupIds = []; + } + if (options.objects || options.defaults) + object.tags = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.version = ""; + object.instanceType = ""; + object.iamInstanceProfile = ""; + object.rootVolume = null; + object.mainVolume = null; + object.databaseEncryption = null; + object.awsServicesAuthentication = null; + object.sshConfig = null; + object.proxyConfig = null; + object.configEncryption = null; + object.instancePlacement = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.instanceType != null && message.hasOwnProperty("instanceType")) + object.instanceType = message.instanceType; + if (message.subnetIds && message.subnetIds.length) { + object.subnetIds = []; + for (var j = 0; j < message.subnetIds.length; ++j) + object.subnetIds[j] = message.subnetIds[j]; + } + if (message.securityGroupIds && message.securityGroupIds.length) { + object.securityGroupIds = []; + for (var j = 0; j < message.securityGroupIds.length; ++j) + object.securityGroupIds[j] = message.securityGroupIds[j]; + } + if (message.iamInstanceProfile != null && message.hasOwnProperty("iamInstanceProfile")) + object.iamInstanceProfile = message.iamInstanceProfile; + if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) + object.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.toObject(message.rootVolume, options); + if (message.mainVolume != null && message.hasOwnProperty("mainVolume")) + object.mainVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.toObject(message.mainVolume, options); + if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) + object.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.toObject(message.databaseEncryption, options); + var keys2; + if (message.tags && (keys2 = Object.keys(message.tags)).length) { + object.tags = {}; + for (var j = 0; j < keys2.length; ++j) + object.tags[keys2[j]] = message.tags[keys2[j]]; + } + if (message.awsServicesAuthentication != null && message.hasOwnProperty("awsServicesAuthentication")) + object.awsServicesAuthentication = $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication.toObject(message.awsServicesAuthentication, options); + if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) + object.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.toObject(message.sshConfig, options); + if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) + object.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.toObject(message.proxyConfig, options); + if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) + object.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.toObject(message.configEncryption, options); + if (message.instancePlacement != null && message.hasOwnProperty("instancePlacement")) + object.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.toObject(message.instancePlacement, options); return object; }; /** - * Converts this ListAwsClustersRequest to JSON. + * Converts this AwsControlPlane to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @instance * @returns {Object.} JSON object */ - ListAwsClustersRequest.prototype.toJSON = function toJSON() { + AwsControlPlane.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAwsClustersRequest + * Gets the default type url for AwsControlPlane * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @memberof google.cloud.gkemulticloud.v1.AwsControlPlane * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAwsClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsControlPlane.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAwsClustersRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsControlPlane"; }; - return ListAwsClustersRequest; + return AwsControlPlane; })(); - v1.ListAwsClustersResponse = (function() { + v1.AwsServicesAuthentication = (function() { /** - * Properties of a ListAwsClustersResponse. + * Properties of an AwsServicesAuthentication. * @memberof google.cloud.gkemulticloud.v1 - * @interface IListAwsClustersResponse - * @property {Array.|null} [awsClusters] ListAwsClustersResponse awsClusters - * @property {string|null} [nextPageToken] ListAwsClustersResponse nextPageToken + * @interface IAwsServicesAuthentication + * @property {string|null} [roleArn] AwsServicesAuthentication roleArn + * @property {string|null} [roleSessionName] AwsServicesAuthentication roleSessionName */ /** - * Constructs a new ListAwsClustersResponse. + * Constructs a new AwsServicesAuthentication. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a ListAwsClustersResponse. - * @implements IListAwsClustersResponse + * @classdesc Represents an AwsServicesAuthentication. + * @implements IAwsServicesAuthentication * @constructor - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersResponse=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication=} [properties] Properties to set */ - function ListAwsClustersResponse(properties) { - this.awsClusters = []; + function AwsServicesAuthentication(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8894,92 +8656,89 @@ } /** - * ListAwsClustersResponse awsClusters. - * @member {Array.} awsClusters - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * AwsServicesAuthentication roleArn. + * @member {string} roleArn + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @instance */ - ListAwsClustersResponse.prototype.awsClusters = $util.emptyArray; + AwsServicesAuthentication.prototype.roleArn = ""; /** - * ListAwsClustersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * AwsServicesAuthentication roleSessionName. + * @member {string} roleSessionName + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @instance */ - ListAwsClustersResponse.prototype.nextPageToken = ""; + AwsServicesAuthentication.prototype.roleSessionName = ""; /** - * Creates a new ListAwsClustersResponse instance using the specified properties. + * Creates a new AwsServicesAuthentication instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersResponse=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} ListAwsClustersResponse instance + * @param {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} AwsServicesAuthentication instance */ - ListAwsClustersResponse.create = function create(properties) { - return new ListAwsClustersResponse(properties); + AwsServicesAuthentication.create = function create(properties) { + return new AwsServicesAuthentication(properties); }; /** - * Encodes the specified ListAwsClustersResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.verify|verify} messages. + * Encodes the specified AwsServicesAuthentication message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersResponse} message ListAwsClustersResponse message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication} message AwsServicesAuthentication message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAwsClustersResponse.encode = function encode(message, writer) { + AwsServicesAuthentication.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.awsClusters != null && message.awsClusters.length) - for (var i = 0; i < message.awsClusters.length; ++i) - $root.google.cloud.gkemulticloud.v1.AwsCluster.encode(message.awsClusters[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.roleArn != null && Object.hasOwnProperty.call(message, "roleArn")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.roleArn); + if (message.roleSessionName != null && Object.hasOwnProperty.call(message, "roleSessionName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.roleSessionName); return writer; }; /** - * Encodes the specified ListAwsClustersResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.verify|verify} messages. + * Encodes the specified AwsServicesAuthentication message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServicesAuthentication.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsClustersResponse} message ListAwsClustersResponse message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsServicesAuthentication} message AwsServicesAuthentication message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAwsClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { + AwsServicesAuthentication.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAwsClustersResponse message from the specified reader or buffer. + * Decodes an AwsServicesAuthentication message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} ListAwsClustersResponse + * @returns {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} AwsServicesAuthentication * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAwsClustersResponse.decode = function decode(reader, length) { + AwsServicesAuthentication.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAwsClustersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.awsClusters && message.awsClusters.length)) - message.awsClusters = []; - message.awsClusters.push($root.google.cloud.gkemulticloud.v1.AwsCluster.decode(reader, reader.uint32())); + message.roleArn = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.roleSessionName = reader.string(); break; } default: @@ -8991,151 +8750,132 @@ }; /** - * Decodes a ListAwsClustersResponse message from the specified reader or buffer, length delimited. + * Decodes an AwsServicesAuthentication message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} ListAwsClustersResponse + * @returns {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} AwsServicesAuthentication * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAwsClustersResponse.decodeDelimited = function decodeDelimited(reader) { + AwsServicesAuthentication.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAwsClustersResponse message. + * Verifies an AwsServicesAuthentication message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAwsClustersResponse.verify = function verify(message) { + AwsServicesAuthentication.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.awsClusters != null && message.hasOwnProperty("awsClusters")) { - if (!Array.isArray(message.awsClusters)) - return "awsClusters: array expected"; - for (var i = 0; i < message.awsClusters.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.AwsCluster.verify(message.awsClusters[i]); - if (error) - return "awsClusters." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.roleArn != null && message.hasOwnProperty("roleArn")) + if (!$util.isString(message.roleArn)) + return "roleArn: string expected"; + if (message.roleSessionName != null && message.hasOwnProperty("roleSessionName")) + if (!$util.isString(message.roleSessionName)) + return "roleSessionName: string expected"; return null; }; /** - * Creates a ListAwsClustersResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AwsServicesAuthentication message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} ListAwsClustersResponse + * @returns {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} AwsServicesAuthentication */ - ListAwsClustersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAwsClustersResponse) + AwsServicesAuthentication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication) return object; - var message = new $root.google.cloud.gkemulticloud.v1.ListAwsClustersResponse(); - if (object.awsClusters) { - if (!Array.isArray(object.awsClusters)) - throw TypeError(".google.cloud.gkemulticloud.v1.ListAwsClustersResponse.awsClusters: array expected"); - message.awsClusters = []; - for (var i = 0; i < object.awsClusters.length; ++i) { - if (typeof object.awsClusters[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.ListAwsClustersResponse.awsClusters: object expected"); - message.awsClusters[i] = $root.google.cloud.gkemulticloud.v1.AwsCluster.fromObject(object.awsClusters[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.gkemulticloud.v1.AwsServicesAuthentication(); + if (object.roleArn != null) + message.roleArn = String(object.roleArn); + if (object.roleSessionName != null) + message.roleSessionName = String(object.roleSessionName); return message; }; /** - * Creates a plain object from a ListAwsClustersResponse message. Also converts values to other types if specified. + * Creates a plain object from an AwsServicesAuthentication message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static - * @param {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} message ListAwsClustersResponse + * @param {google.cloud.gkemulticloud.v1.AwsServicesAuthentication} message AwsServicesAuthentication * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAwsClustersResponse.toObject = function toObject(message, options) { + AwsServicesAuthentication.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.awsClusters = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.awsClusters && message.awsClusters.length) { - object.awsClusters = []; - for (var j = 0; j < message.awsClusters.length; ++j) - object.awsClusters[j] = $root.google.cloud.gkemulticloud.v1.AwsCluster.toObject(message.awsClusters[j], options); + if (options.defaults) { + object.roleArn = ""; + object.roleSessionName = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.roleArn != null && message.hasOwnProperty("roleArn")) + object.roleArn = message.roleArn; + if (message.roleSessionName != null && message.hasOwnProperty("roleSessionName")) + object.roleSessionName = message.roleSessionName; return object; }; /** - * Converts this ListAwsClustersResponse to JSON. + * Converts this AwsServicesAuthentication to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @instance * @returns {Object.} JSON object */ - ListAwsClustersResponse.prototype.toJSON = function toJSON() { + AwsServicesAuthentication.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAwsClustersResponse + * Gets the default type url for AwsServicesAuthentication * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @memberof google.cloud.gkemulticloud.v1.AwsServicesAuthentication * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAwsClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsServicesAuthentication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAwsClustersResponse"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsServicesAuthentication"; }; - return ListAwsClustersResponse; + return AwsServicesAuthentication; })(); - v1.DeleteAwsClusterRequest = (function() { + v1.AwsAuthorization = (function() { /** - * Properties of a DeleteAwsClusterRequest. + * Properties of an AwsAuthorization. * @memberof google.cloud.gkemulticloud.v1 - * @interface IDeleteAwsClusterRequest - * @property {string|null} [name] DeleteAwsClusterRequest name - * @property {boolean|null} [validateOnly] DeleteAwsClusterRequest validateOnly - * @property {boolean|null} [allowMissing] DeleteAwsClusterRequest allowMissing - * @property {string|null} [etag] DeleteAwsClusterRequest etag + * @interface IAwsAuthorization + * @property {Array.|null} [adminUsers] AwsAuthorization adminUsers */ /** - * Constructs a new DeleteAwsClusterRequest. + * Constructs a new AwsAuthorization. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a DeleteAwsClusterRequest. - * @implements IDeleteAwsClusterRequest + * @classdesc Represents an AwsAuthorization. + * @implements IAwsAuthorization * @constructor - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsAuthorization=} [properties] Properties to set */ - function DeleteAwsClusterRequest(properties) { + function AwsAuthorization(properties) { + this.adminUsers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9143,117 +8883,78 @@ } /** - * DeleteAwsClusterRequest name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest - * @instance - */ - DeleteAwsClusterRequest.prototype.name = ""; - - /** - * DeleteAwsClusterRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest - * @instance - */ - DeleteAwsClusterRequest.prototype.validateOnly = false; - - /** - * DeleteAwsClusterRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest - * @instance - */ - DeleteAwsClusterRequest.prototype.allowMissing = false; - - /** - * DeleteAwsClusterRequest etag. - * @member {string} etag - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * AwsAuthorization adminUsers. + * @member {Array.} adminUsers + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @instance */ - DeleteAwsClusterRequest.prototype.etag = ""; + AwsAuthorization.prototype.adminUsers = $util.emptyArray; /** - * Creates a new DeleteAwsClusterRequest instance using the specified properties. + * Creates a new AwsAuthorization instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} DeleteAwsClusterRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsAuthorization=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsAuthorization} AwsAuthorization instance */ - DeleteAwsClusterRequest.create = function create(properties) { - return new DeleteAwsClusterRequest(properties); + AwsAuthorization.create = function create(properties) { + return new AwsAuthorization(properties); }; /** - * Encodes the specified DeleteAwsClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.verify|verify} messages. + * Encodes the specified AwsAuthorization message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAuthorization.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest} message DeleteAwsClusterRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsAuthorization} message AwsAuthorization message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAwsClusterRequest.encode = function encode(message, writer) { + AwsAuthorization.encode = function encode(message, writer) { 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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.adminUsers != null && message.adminUsers.length) + for (var i = 0; i < message.adminUsers.length; ++i) + $root.google.cloud.gkemulticloud.v1.AwsClusterUser.encode(message.adminUsers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteAwsClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.verify|verify} messages. + * Encodes the specified AwsAuthorization message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAuthorization.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest} message DeleteAwsClusterRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsAuthorization} message AwsAuthorization message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAwsClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsAuthorization.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAwsClusterRequest message from the specified reader or buffer. + * Decodes an AwsAuthorization message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} DeleteAwsClusterRequest + * @returns {google.cloud.gkemulticloud.v1.AwsAuthorization} AwsAuthorization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAwsClusterRequest.decode = function decode(reader, length) { + AwsAuthorization.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsAuthorization(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.validateOnly = reader.bool(); - break; - } - case 3: { - message.allowMissing = reader.bool(); - break; - } - case 4: { - message.etag = reader.string(); + if (!(message.adminUsers && message.adminUsers.length)) + message.adminUsers = []; + message.adminUsers.push($root.google.cloud.gkemulticloud.v1.AwsClusterUser.decode(reader, reader.uint32())); break; } default: @@ -9265,150 +8966,139 @@ }; /** - * Decodes a DeleteAwsClusterRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsAuthorization message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} DeleteAwsClusterRequest + * @returns {google.cloud.gkemulticloud.v1.AwsAuthorization} AwsAuthorization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAwsClusterRequest.decodeDelimited = function decodeDelimited(reader) { + AwsAuthorization.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAwsClusterRequest message. + * Verifies an AwsAuthorization message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAwsClusterRequest.verify = function verify(message) { + AwsAuthorization.verify = function verify(message) { if (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.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; + if (message.adminUsers != null && message.hasOwnProperty("adminUsers")) { + if (!Array.isArray(message.adminUsers)) + return "adminUsers: array expected"; + for (var i = 0; i < message.adminUsers.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AwsClusterUser.verify(message.adminUsers[i]); + if (error) + return "adminUsers." + error; + } + } return null; }; /** - * Creates a DeleteAwsClusterRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsAuthorization message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} DeleteAwsClusterRequest + * @returns {google.cloud.gkemulticloud.v1.AwsAuthorization} AwsAuthorization */ - DeleteAwsClusterRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) + AwsAuthorization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsAuthorization) return object; - var message = new $root.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.etag != null) - message.etag = String(object.etag); + var message = new $root.google.cloud.gkemulticloud.v1.AwsAuthorization(); + if (object.adminUsers) { + if (!Array.isArray(object.adminUsers)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsAuthorization.adminUsers: array expected"); + message.adminUsers = []; + for (var i = 0; i < object.adminUsers.length; ++i) { + if (typeof object.adminUsers[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsAuthorization.adminUsers: object expected"); + message.adminUsers[i] = $root.google.cloud.gkemulticloud.v1.AwsClusterUser.fromObject(object.adminUsers[i]); + } + } return message; }; /** - * Creates a plain object from a DeleteAwsClusterRequest message. Also converts values to other types if specified. + * Creates a plain object from an AwsAuthorization message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} message DeleteAwsClusterRequest + * @param {google.cloud.gkemulticloud.v1.AwsAuthorization} message AwsAuthorization * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAwsClusterRequest.toObject = function toObject(message, options) { + AwsAuthorization.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.validateOnly = false; - object.allowMissing = false; - object.etag = ""; + if (options.arrays || options.defaults) + object.adminUsers = []; + if (message.adminUsers && message.adminUsers.length) { + object.adminUsers = []; + for (var j = 0; j < message.adminUsers.length; ++j) + object.adminUsers[j] = $root.google.cloud.gkemulticloud.v1.AwsClusterUser.toObject(message.adminUsers[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; return object; }; /** - * Converts this DeleteAwsClusterRequest to JSON. + * Converts this AwsAuthorization to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @instance * @returns {Object.} JSON object */ - DeleteAwsClusterRequest.prototype.toJSON = function toJSON() { + AwsAuthorization.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteAwsClusterRequest + * Gets the default type url for AwsAuthorization * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @memberof google.cloud.gkemulticloud.v1.AwsAuthorization * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteAwsClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsAuthorization"; }; - return DeleteAwsClusterRequest; + return AwsAuthorization; })(); - v1.CreateAwsNodePoolRequest = (function() { + v1.AwsClusterUser = (function() { /** - * Properties of a CreateAwsNodePoolRequest. + * Properties of an AwsClusterUser. * @memberof google.cloud.gkemulticloud.v1 - * @interface ICreateAwsNodePoolRequest - * @property {string|null} [parent] CreateAwsNodePoolRequest parent - * @property {google.cloud.gkemulticloud.v1.IAwsNodePool|null} [awsNodePool] CreateAwsNodePoolRequest awsNodePool - * @property {string|null} [awsNodePoolId] CreateAwsNodePoolRequest awsNodePoolId - * @property {boolean|null} [validateOnly] CreateAwsNodePoolRequest validateOnly + * @interface IAwsClusterUser + * @property {string|null} [username] AwsClusterUser username */ /** - * Constructs a new CreateAwsNodePoolRequest. + * Constructs a new AwsClusterUser. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a CreateAwsNodePoolRequest. - * @implements ICreateAwsNodePoolRequest + * @classdesc Represents an AwsClusterUser. + * @implements IAwsClusterUser * @constructor - * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsClusterUser=} [properties] Properties to set */ - function CreateAwsNodePoolRequest(properties) { + function AwsClusterUser(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9416,117 +9106,75 @@ } /** - * CreateAwsNodePoolRequest parent. - * @member {string} parent - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest - * @instance - */ - CreateAwsNodePoolRequest.prototype.parent = ""; - - /** - * CreateAwsNodePoolRequest awsNodePool. - * @member {google.cloud.gkemulticloud.v1.IAwsNodePool|null|undefined} awsNodePool - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest - * @instance - */ - CreateAwsNodePoolRequest.prototype.awsNodePool = null; - - /** - * CreateAwsNodePoolRequest awsNodePoolId. - * @member {string} awsNodePoolId - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest - * @instance - */ - CreateAwsNodePoolRequest.prototype.awsNodePoolId = ""; - - /** - * CreateAwsNodePoolRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * AwsClusterUser username. + * @member {string} username + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @instance */ - CreateAwsNodePoolRequest.prototype.validateOnly = false; + AwsClusterUser.prototype.username = ""; /** - * Creates a new CreateAwsNodePoolRequest instance using the specified properties. + * Creates a new AwsClusterUser instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} CreateAwsNodePoolRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsClusterUser=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsClusterUser} AwsClusterUser instance */ - CreateAwsNodePoolRequest.create = function create(properties) { - return new CreateAwsNodePoolRequest(properties); + AwsClusterUser.create = function create(properties) { + return new AwsClusterUser(properties); }; /** - * Encodes the specified CreateAwsNodePoolRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.verify|verify} messages. + * Encodes the specified AwsClusterUser message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterUser.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest} message CreateAwsNodePoolRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsClusterUser} message AwsClusterUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAwsNodePoolRequest.encode = function encode(message, writer) { + AwsClusterUser.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.awsNodePool != null && Object.hasOwnProperty.call(message, "awsNodePool")) - $root.google.cloud.gkemulticloud.v1.AwsNodePool.encode(message.awsNodePool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.awsNodePoolId != null && Object.hasOwnProperty.call(message, "awsNodePoolId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.awsNodePoolId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); return writer; }; /** - * Encodes the specified CreateAwsNodePoolRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.verify|verify} messages. + * Encodes the specified AwsClusterUser message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterUser.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest} message CreateAwsNodePoolRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsClusterUser} message AwsClusterUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAwsNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsClusterUser.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAwsNodePoolRequest message from the specified reader or buffer. + * Decodes an AwsClusterUser message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} CreateAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsClusterUser} AwsClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAwsNodePoolRequest.decode = function decode(reader, length) { + AwsClusterUser.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsClusterUser(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.decode(reader, reader.uint32()); - break; - } - case 3: { - message.awsNodePoolId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); + message.username = reader.string(); break; } default: @@ -9538,154 +9186,122 @@ }; /** - * Decodes a CreateAwsNodePoolRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsClusterUser message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} CreateAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsClusterUser} AwsClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAwsNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + AwsClusterUser.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAwsNodePoolRequest message. + * Verifies an AwsClusterUser message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAwsNodePoolRequest.verify = function verify(message) { + AwsClusterUser.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.awsNodePool != null && message.hasOwnProperty("awsNodePool")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsNodePool.verify(message.awsNodePool); - if (error) - return "awsNodePool." + error; - } - if (message.awsNodePoolId != null && message.hasOwnProperty("awsNodePoolId")) - if (!$util.isString(message.awsNodePoolId)) - return "awsNodePoolId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; return null; }; /** - * Creates a CreateAwsNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsClusterUser message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} CreateAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsClusterUser} AwsClusterUser */ - CreateAwsNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) + AwsClusterUser.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsClusterUser) return object; - var message = new $root.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.awsNodePool != null) { - if (typeof object.awsNodePool !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.awsNodePool: object expected"); - message.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.fromObject(object.awsNodePool); - } - if (object.awsNodePoolId != null) - message.awsNodePoolId = String(object.awsNodePoolId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.gkemulticloud.v1.AwsClusterUser(); + if (object.username != null) + message.username = String(object.username); return message; }; /** - * Creates a plain object from a CreateAwsNodePoolRequest message. Also converts values to other types if specified. + * Creates a plain object from an AwsClusterUser message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} message CreateAwsNodePoolRequest + * @param {google.cloud.gkemulticloud.v1.AwsClusterUser} message AwsClusterUser * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAwsNodePoolRequest.toObject = function toObject(message, options) { + AwsClusterUser.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.awsNodePool = null; - object.awsNodePoolId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.awsNodePool != null && message.hasOwnProperty("awsNodePool")) - object.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.toObject(message.awsNodePool, options); - if (message.awsNodePoolId != null && message.hasOwnProperty("awsNodePoolId")) - object.awsNodePoolId = message.awsNodePoolId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.username = ""; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; return object; }; /** - * Converts this CreateAwsNodePoolRequest to JSON. + * Converts this AwsClusterUser to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @instance * @returns {Object.} JSON object */ - CreateAwsNodePoolRequest.prototype.toJSON = function toJSON() { + AwsClusterUser.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateAwsNodePoolRequest + * Gets the default type url for AwsClusterUser * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterUser * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateAwsNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsClusterUser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsClusterUser"; }; - return CreateAwsNodePoolRequest; + return AwsClusterUser; })(); - v1.UpdateAwsNodePoolRequest = (function() { + v1.AwsDatabaseEncryption = (function() { /** - * Properties of an UpdateAwsNodePoolRequest. + * Properties of an AwsDatabaseEncryption. * @memberof google.cloud.gkemulticloud.v1 - * @interface IUpdateAwsNodePoolRequest - * @property {google.cloud.gkemulticloud.v1.IAwsNodePool|null} [awsNodePool] UpdateAwsNodePoolRequest awsNodePool - * @property {boolean|null} [validateOnly] UpdateAwsNodePoolRequest validateOnly - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAwsNodePoolRequest updateMask + * @interface IAwsDatabaseEncryption + * @property {string|null} [kmsKeyArn] AwsDatabaseEncryption kmsKeyArn */ /** - * Constructs a new UpdateAwsNodePoolRequest. + * Constructs a new AwsDatabaseEncryption. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an UpdateAwsNodePoolRequest. - * @implements IUpdateAwsNodePoolRequest + * @classdesc Represents an AwsDatabaseEncryption. + * @implements IAwsDatabaseEncryption * @constructor - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption=} [properties] Properties to set */ - function UpdateAwsNodePoolRequest(properties) { + function AwsDatabaseEncryption(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9693,103 +9309,75 @@ } /** - * UpdateAwsNodePoolRequest awsNodePool. - * @member {google.cloud.gkemulticloud.v1.IAwsNodePool|null|undefined} awsNodePool - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest - * @instance - */ - UpdateAwsNodePoolRequest.prototype.awsNodePool = null; - - /** - * UpdateAwsNodePoolRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest - * @instance - */ - UpdateAwsNodePoolRequest.prototype.validateOnly = false; - - /** - * UpdateAwsNodePoolRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * AwsDatabaseEncryption kmsKeyArn. + * @member {string} kmsKeyArn + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @instance */ - UpdateAwsNodePoolRequest.prototype.updateMask = null; + AwsDatabaseEncryption.prototype.kmsKeyArn = ""; /** - * Creates a new UpdateAwsNodePoolRequest instance using the specified properties. + * Creates a new AwsDatabaseEncryption instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} UpdateAwsNodePoolRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} AwsDatabaseEncryption instance */ - UpdateAwsNodePoolRequest.create = function create(properties) { - return new UpdateAwsNodePoolRequest(properties); + AwsDatabaseEncryption.create = function create(properties) { + return new AwsDatabaseEncryption(properties); }; /** - * Encodes the specified UpdateAwsNodePoolRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.verify|verify} messages. + * Encodes the specified AwsDatabaseEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest} message UpdateAwsNodePoolRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption} message AwsDatabaseEncryption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAwsNodePoolRequest.encode = function encode(message, writer) { + AwsDatabaseEncryption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.awsNodePool != null && Object.hasOwnProperty.call(message, "awsNodePool")) - $root.google.cloud.gkemulticloud.v1.AwsNodePool.encode(message.awsNodePool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.kmsKeyArn != null && Object.hasOwnProperty.call(message, "kmsKeyArn")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyArn); return writer; }; /** - * Encodes the specified UpdateAwsNodePoolRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.verify|verify} messages. + * Encodes the specified AwsDatabaseEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsDatabaseEncryption.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest} message UpdateAwsNodePoolRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsDatabaseEncryption} message AwsDatabaseEncryption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAwsNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsDatabaseEncryption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateAwsNodePoolRequest message from the specified reader or buffer. + * Decodes an AwsDatabaseEncryption message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} UpdateAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} AwsDatabaseEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAwsNodePoolRequest.decode = function decode(reader, length) { + AwsDatabaseEncryption.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.decode(reader, reader.uint32()); - break; - } - case 2: { - message.validateOnly = reader.bool(); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.kmsKeyArn = reader.string(); break; } default: @@ -9801,149 +9389,125 @@ }; /** - * Decodes an UpdateAwsNodePoolRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsDatabaseEncryption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} UpdateAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} AwsDatabaseEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAwsNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + AwsDatabaseEncryption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateAwsNodePoolRequest message. + * Verifies an AwsDatabaseEncryption message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateAwsNodePoolRequest.verify = function verify(message) { + AwsDatabaseEncryption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.awsNodePool != null && message.hasOwnProperty("awsNodePool")) { - var error = $root.google.cloud.gkemulticloud.v1.AwsNodePool.verify(message.awsNodePool); - if (error) - return "awsNodePool." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) + if (!$util.isString(message.kmsKeyArn)) + return "kmsKeyArn: string expected"; return null; }; /** - * Creates an UpdateAwsNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsDatabaseEncryption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} UpdateAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} AwsDatabaseEncryption */ - UpdateAwsNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) + AwsDatabaseEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption) return object; - var message = new $root.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest(); - if (object.awsNodePool != null) { - if (typeof object.awsNodePool !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.awsNodePool: object expected"); - message.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.fromObject(object.awsNodePool); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.gkemulticloud.v1.AwsDatabaseEncryption(); + if (object.kmsKeyArn != null) + message.kmsKeyArn = String(object.kmsKeyArn); return message; }; /** - * Creates a plain object from an UpdateAwsNodePoolRequest message. Also converts values to other types if specified. + * Creates a plain object from an AwsDatabaseEncryption message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static - * @param {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} message UpdateAwsNodePoolRequest + * @param {google.cloud.gkemulticloud.v1.AwsDatabaseEncryption} message AwsDatabaseEncryption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAwsNodePoolRequest.toObject = function toObject(message, options) { + AwsDatabaseEncryption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.awsNodePool = null; - object.validateOnly = false; - object.updateMask = null; - } - if (message.awsNodePool != null && message.hasOwnProperty("awsNodePool")) - object.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.toObject(message.awsNodePool, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.kmsKeyArn = ""; + if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) + object.kmsKeyArn = message.kmsKeyArn; return object; }; /** - * Converts this UpdateAwsNodePoolRequest to JSON. + * Converts this AwsDatabaseEncryption to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @instance * @returns {Object.} JSON object */ - UpdateAwsNodePoolRequest.prototype.toJSON = function toJSON() { + AwsDatabaseEncryption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateAwsNodePoolRequest + * Gets the default type url for AwsDatabaseEncryption * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsDatabaseEncryption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateAwsNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsDatabaseEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsDatabaseEncryption"; }; - return UpdateAwsNodePoolRequest; + return AwsDatabaseEncryption; })(); - v1.GetAwsNodePoolRequest = (function() { + v1.AwsVolumeTemplate = (function() { /** - * Properties of a GetAwsNodePoolRequest. + * Properties of an AwsVolumeTemplate. * @memberof google.cloud.gkemulticloud.v1 - * @interface IGetAwsNodePoolRequest - * @property {string|null} [name] GetAwsNodePoolRequest name + * @interface IAwsVolumeTemplate + * @property {number|null} [sizeGib] AwsVolumeTemplate sizeGib + * @property {google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType|null} [volumeType] AwsVolumeTemplate volumeType + * @property {number|null} [iops] AwsVolumeTemplate iops + * @property {string|null} [kmsKeyArn] AwsVolumeTemplate kmsKeyArn */ /** - * Constructs a new GetAwsNodePoolRequest. + * Constructs a new AwsVolumeTemplate. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a GetAwsNodePoolRequest. - * @implements IGetAwsNodePoolRequest + * @classdesc Represents an AwsVolumeTemplate. + * @implements IAwsVolumeTemplate * @constructor - * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate=} [properties] Properties to set */ - function GetAwsNodePoolRequest(properties) { + function AwsVolumeTemplate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9951,75 +9515,117 @@ } /** - * GetAwsNodePoolRequest name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * AwsVolumeTemplate sizeGib. + * @member {number} sizeGib + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @instance */ - GetAwsNodePoolRequest.prototype.name = ""; + AwsVolumeTemplate.prototype.sizeGib = 0; /** - * Creates a new GetAwsNodePoolRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest - * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} GetAwsNodePoolRequest instance + * AwsVolumeTemplate volumeType. + * @member {google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType} volumeType + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @instance */ - GetAwsNodePoolRequest.create = function create(properties) { - return new GetAwsNodePoolRequest(properties); + AwsVolumeTemplate.prototype.volumeType = 0; + + /** + * AwsVolumeTemplate iops. + * @member {number} iops + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @instance + */ + AwsVolumeTemplate.prototype.iops = 0; + + /** + * AwsVolumeTemplate kmsKeyArn. + * @member {string} kmsKeyArn + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @instance + */ + AwsVolumeTemplate.prototype.kmsKeyArn = ""; + + /** + * Creates a new AwsVolumeTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} AwsVolumeTemplate instance + */ + AwsVolumeTemplate.create = function create(properties) { + return new AwsVolumeTemplate(properties); }; /** - * Encodes the specified GetAwsNodePoolRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.verify|verify} messages. + * Encodes the specified AwsVolumeTemplate message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest} message GetAwsNodePoolRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate} message AwsVolumeTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAwsNodePoolRequest.encode = function encode(message, writer) { + AwsVolumeTemplate.encode = function encode(message, writer) { 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.sizeGib != null && Object.hasOwnProperty.call(message, "sizeGib")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sizeGib); + if (message.volumeType != null && Object.hasOwnProperty.call(message, "volumeType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.volumeType); + if (message.iops != null && Object.hasOwnProperty.call(message, "iops")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.iops); + if (message.kmsKeyArn != null && Object.hasOwnProperty.call(message, "kmsKeyArn")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyArn); return writer; }; /** - * Encodes the specified GetAwsNodePoolRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.verify|verify} messages. + * Encodes the specified AwsVolumeTemplate message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest} message GetAwsNodePoolRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate} message AwsVolumeTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAwsNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsVolumeTemplate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAwsNodePoolRequest message from the specified reader or buffer. + * Decodes an AwsVolumeTemplate message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} GetAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} AwsVolumeTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAwsNodePoolRequest.decode = function decode(reader, length) { + AwsVolumeTemplate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.sizeGib = reader.int32(); + break; + } + case 2: { + message.volumeType = reader.int32(); + break; + } + case 3: { + message.iops = reader.int32(); + break; + } + case 4: { + message.kmsKeyArn = reader.string(); break; } default: @@ -10031,124 +9637,191 @@ }; /** - * Decodes a GetAwsNodePoolRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsVolumeTemplate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} GetAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} AwsVolumeTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAwsNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + AwsVolumeTemplate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAwsNodePoolRequest message. + * Verifies an AwsVolumeTemplate message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAwsNodePoolRequest.verify = function verify(message) { + AwsVolumeTemplate.verify = function verify(message) { if (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.sizeGib != null && message.hasOwnProperty("sizeGib")) + if (!$util.isInteger(message.sizeGib)) + return "sizeGib: integer expected"; + if (message.volumeType != null && message.hasOwnProperty("volumeType")) + switch (message.volumeType) { + default: + return "volumeType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.iops != null && message.hasOwnProperty("iops")) + if (!$util.isInteger(message.iops)) + return "iops: integer expected"; + if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) + if (!$util.isString(message.kmsKeyArn)) + return "kmsKeyArn: string expected"; return null; }; /** - * Creates a GetAwsNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsVolumeTemplate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} GetAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} AwsVolumeTemplate */ - GetAwsNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) + AwsVolumeTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate) return object; - var message = new $root.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate(); + if (object.sizeGib != null) + message.sizeGib = object.sizeGib | 0; + switch (object.volumeType) { + default: + if (typeof object.volumeType === "number") { + message.volumeType = object.volumeType; + break; + } + break; + case "VOLUME_TYPE_UNSPECIFIED": + case 0: + message.volumeType = 0; + break; + case "GP2": + case 1: + message.volumeType = 1; + break; + case "GP3": + case 2: + message.volumeType = 2; + break; + } + if (object.iops != null) + message.iops = object.iops | 0; + if (object.kmsKeyArn != null) + message.kmsKeyArn = String(object.kmsKeyArn); return message; }; /** - * Creates a plain object from a GetAwsNodePoolRequest message. Also converts values to other types if specified. + * Creates a plain object from an AwsVolumeTemplate message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @static - * @param {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} message GetAwsNodePoolRequest + * @param {google.cloud.gkemulticloud.v1.AwsVolumeTemplate} message AwsVolumeTemplate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAwsNodePoolRequest.toObject = function toObject(message, options) { + AwsVolumeTemplate.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.sizeGib = 0; + object.volumeType = options.enums === String ? "VOLUME_TYPE_UNSPECIFIED" : 0; + object.iops = 0; + object.kmsKeyArn = ""; + } + if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) + object.sizeGib = message.sizeGib; + if (message.volumeType != null && message.hasOwnProperty("volumeType")) + object.volumeType = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType[message.volumeType] === undefined ? message.volumeType : $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType[message.volumeType] : message.volumeType; + if (message.iops != null && message.hasOwnProperty("iops")) + object.iops = message.iops; + if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) + object.kmsKeyArn = message.kmsKeyArn; return object; }; /** - * Converts this GetAwsNodePoolRequest to JSON. + * Converts this AwsVolumeTemplate to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @instance * @returns {Object.} JSON object */ - GetAwsNodePoolRequest.prototype.toJSON = function toJSON() { + AwsVolumeTemplate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetAwsNodePoolRequest + * Gets the default type url for AwsVolumeTemplate * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsVolumeTemplate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetAwsNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsVolumeTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsVolumeTemplate"; }; - return GetAwsNodePoolRequest; + /** + * VolumeType enum. + * @name google.cloud.gkemulticloud.v1.AwsVolumeTemplate.VolumeType + * @enum {number} + * @property {number} VOLUME_TYPE_UNSPECIFIED=0 VOLUME_TYPE_UNSPECIFIED value + * @property {number} GP2=1 GP2 value + * @property {number} GP3=2 GP3 value + */ + AwsVolumeTemplate.VolumeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOLUME_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GP2"] = 1; + values[valuesById[2] = "GP3"] = 2; + return values; + })(); + + return AwsVolumeTemplate; })(); - v1.ListAwsNodePoolsRequest = (function() { + v1.AwsClusterNetworking = (function() { /** - * Properties of a ListAwsNodePoolsRequest. + * Properties of an AwsClusterNetworking. * @memberof google.cloud.gkemulticloud.v1 - * @interface IListAwsNodePoolsRequest - * @property {string|null} [parent] ListAwsNodePoolsRequest parent - * @property {number|null} [pageSize] ListAwsNodePoolsRequest pageSize - * @property {string|null} [pageToken] ListAwsNodePoolsRequest pageToken + * @interface IAwsClusterNetworking + * @property {string|null} [vpcId] AwsClusterNetworking vpcId + * @property {Array.|null} [podAddressCidrBlocks] AwsClusterNetworking podAddressCidrBlocks + * @property {Array.|null} [serviceAddressCidrBlocks] AwsClusterNetworking serviceAddressCidrBlocks */ /** - * Constructs a new ListAwsNodePoolsRequest. + * Constructs a new AwsClusterNetworking. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a ListAwsNodePoolsRequest. - * @implements IListAwsNodePoolsRequest + * @classdesc Represents an AwsClusterNetworking. + * @implements IAwsClusterNetworking * @constructor - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsClusterNetworking=} [properties] Properties to set */ - function ListAwsNodePoolsRequest(properties) { + function AwsClusterNetworking(properties) { + this.podAddressCidrBlocks = []; + this.serviceAddressCidrBlocks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10156,103 +9829,109 @@ } /** - * ListAwsNodePoolsRequest parent. - * @member {string} parent - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * AwsClusterNetworking vpcId. + * @member {string} vpcId + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @instance */ - ListAwsNodePoolsRequest.prototype.parent = ""; + AwsClusterNetworking.prototype.vpcId = ""; /** - * ListAwsNodePoolsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * AwsClusterNetworking podAddressCidrBlocks. + * @member {Array.} podAddressCidrBlocks + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @instance */ - ListAwsNodePoolsRequest.prototype.pageSize = 0; + AwsClusterNetworking.prototype.podAddressCidrBlocks = $util.emptyArray; /** - * ListAwsNodePoolsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * AwsClusterNetworking serviceAddressCidrBlocks. + * @member {Array.} serviceAddressCidrBlocks + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @instance */ - ListAwsNodePoolsRequest.prototype.pageToken = ""; + AwsClusterNetworking.prototype.serviceAddressCidrBlocks = $util.emptyArray; /** - * Creates a new ListAwsNodePoolsRequest instance using the specified properties. + * Creates a new AwsClusterNetworking instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} ListAwsNodePoolsRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsClusterNetworking=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsClusterNetworking} AwsClusterNetworking instance */ - ListAwsNodePoolsRequest.create = function create(properties) { - return new ListAwsNodePoolsRequest(properties); + AwsClusterNetworking.create = function create(properties) { + return new AwsClusterNetworking(properties); }; /** - * Encodes the specified ListAwsNodePoolsRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.verify|verify} messages. + * Encodes the specified AwsClusterNetworking message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest} message ListAwsNodePoolsRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsClusterNetworking} message AwsClusterNetworking message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAwsNodePoolsRequest.encode = function encode(message, writer) { + AwsClusterNetworking.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.vpcId != null && Object.hasOwnProperty.call(message, "vpcId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpcId); + if (message.podAddressCidrBlocks != null && message.podAddressCidrBlocks.length) + for (var i = 0; i < message.podAddressCidrBlocks.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.podAddressCidrBlocks[i]); + if (message.serviceAddressCidrBlocks != null && message.serviceAddressCidrBlocks.length) + for (var i = 0; i < message.serviceAddressCidrBlocks.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAddressCidrBlocks[i]); return writer; }; /** - * Encodes the specified ListAwsNodePoolsRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.verify|verify} messages. + * Encodes the specified AwsClusterNetworking message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterNetworking.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest} message ListAwsNodePoolsRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsClusterNetworking} message AwsClusterNetworking message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAwsNodePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsClusterNetworking.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAwsNodePoolsRequest message from the specified reader or buffer. + * Decodes an AwsClusterNetworking message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} ListAwsNodePoolsRequest + * @returns {google.cloud.gkemulticloud.v1.AwsClusterNetworking} AwsClusterNetworking * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAwsNodePoolsRequest.decode = function decode(reader, length) { + AwsClusterNetworking.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.vpcId = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + if (!(message.podAddressCidrBlocks && message.podAddressCidrBlocks.length)) + message.podAddressCidrBlocks = []; + message.podAddressCidrBlocks.push(reader.string()); break; } case 3: { - message.pageToken = reader.string(); + if (!(message.serviceAddressCidrBlocks && message.serviceAddressCidrBlocks.length)) + message.serviceAddressCidrBlocks = []; + message.serviceAddressCidrBlocks.push(reader.string()); break; } default: @@ -10264,141 +9943,179 @@ }; /** - * Decodes a ListAwsNodePoolsRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsClusterNetworking message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} ListAwsNodePoolsRequest + * @returns {google.cloud.gkemulticloud.v1.AwsClusterNetworking} AwsClusterNetworking * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAwsNodePoolsRequest.decodeDelimited = function decodeDelimited(reader) { + AwsClusterNetworking.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAwsNodePoolsRequest message. + * Verifies an AwsClusterNetworking message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAwsNodePoolsRequest.verify = function verify(message) { + AwsClusterNetworking.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.vpcId != null && message.hasOwnProperty("vpcId")) + if (!$util.isString(message.vpcId)) + return "vpcId: string expected"; + if (message.podAddressCidrBlocks != null && message.hasOwnProperty("podAddressCidrBlocks")) { + if (!Array.isArray(message.podAddressCidrBlocks)) + return "podAddressCidrBlocks: array expected"; + for (var i = 0; i < message.podAddressCidrBlocks.length; ++i) + if (!$util.isString(message.podAddressCidrBlocks[i])) + return "podAddressCidrBlocks: string[] expected"; + } + if (message.serviceAddressCidrBlocks != null && message.hasOwnProperty("serviceAddressCidrBlocks")) { + if (!Array.isArray(message.serviceAddressCidrBlocks)) + return "serviceAddressCidrBlocks: array expected"; + for (var i = 0; i < message.serviceAddressCidrBlocks.length; ++i) + if (!$util.isString(message.serviceAddressCidrBlocks[i])) + return "serviceAddressCidrBlocks: string[] expected"; + } return null; }; /** - * Creates a ListAwsNodePoolsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsClusterNetworking message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} ListAwsNodePoolsRequest + * @returns {google.cloud.gkemulticloud.v1.AwsClusterNetworking} AwsClusterNetworking */ - ListAwsNodePoolsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) + AwsClusterNetworking.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking) return object; - var message = new $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest(); - 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); + var message = new $root.google.cloud.gkemulticloud.v1.AwsClusterNetworking(); + if (object.vpcId != null) + message.vpcId = String(object.vpcId); + if (object.podAddressCidrBlocks) { + if (!Array.isArray(object.podAddressCidrBlocks)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsClusterNetworking.podAddressCidrBlocks: array expected"); + message.podAddressCidrBlocks = []; + for (var i = 0; i < object.podAddressCidrBlocks.length; ++i) + message.podAddressCidrBlocks[i] = String(object.podAddressCidrBlocks[i]); + } + if (object.serviceAddressCidrBlocks) { + if (!Array.isArray(object.serviceAddressCidrBlocks)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsClusterNetworking.serviceAddressCidrBlocks: array expected"); + message.serviceAddressCidrBlocks = []; + for (var i = 0; i < object.serviceAddressCidrBlocks.length; ++i) + message.serviceAddressCidrBlocks[i] = String(object.serviceAddressCidrBlocks[i]); + } return message; }; /** - * Creates a plain object from a ListAwsNodePoolsRequest message. Also converts values to other types if specified. + * Creates a plain object from an AwsClusterNetworking message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static - * @param {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} message ListAwsNodePoolsRequest + * @param {google.cloud.gkemulticloud.v1.AwsClusterNetworking} message AwsClusterNetworking * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAwsNodePoolsRequest.toObject = function toObject(message, options) { + AwsClusterNetworking.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.arrays || options.defaults) { + object.podAddressCidrBlocks = []; + object.serviceAddressCidrBlocks = []; + } + if (options.defaults) + object.vpcId = ""; + if (message.vpcId != null && message.hasOwnProperty("vpcId")) + object.vpcId = message.vpcId; + if (message.podAddressCidrBlocks && message.podAddressCidrBlocks.length) { + object.podAddressCidrBlocks = []; + for (var j = 0; j < message.podAddressCidrBlocks.length; ++j) + object.podAddressCidrBlocks[j] = message.podAddressCidrBlocks[j]; + } + if (message.serviceAddressCidrBlocks && message.serviceAddressCidrBlocks.length) { + object.serviceAddressCidrBlocks = []; + for (var j = 0; j < message.serviceAddressCidrBlocks.length; ++j) + object.serviceAddressCidrBlocks[j] = message.serviceAddressCidrBlocks[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; return object; }; /** - * Converts this ListAwsNodePoolsRequest to JSON. + * Converts this AwsClusterNetworking to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @instance * @returns {Object.} JSON object */ - ListAwsNodePoolsRequest.prototype.toJSON = function toJSON() { + AwsClusterNetworking.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAwsNodePoolsRequest + * Gets the default type url for AwsClusterNetworking * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @memberof google.cloud.gkemulticloud.v1.AwsClusterNetworking * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAwsNodePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsClusterNetworking.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsClusterNetworking"; }; - return ListAwsNodePoolsRequest; + return AwsClusterNetworking; })(); - v1.ListAwsNodePoolsResponse = (function() { + v1.AwsNodePool = (function() { /** - * Properties of a ListAwsNodePoolsResponse. + * Properties of an AwsNodePool. * @memberof google.cloud.gkemulticloud.v1 - * @interface IListAwsNodePoolsResponse - * @property {Array.|null} [awsNodePools] ListAwsNodePoolsResponse awsNodePools - * @property {string|null} [nextPageToken] ListAwsNodePoolsResponse nextPageToken + * @interface IAwsNodePool + * @property {string|null} [name] AwsNodePool name + * @property {string|null} [version] AwsNodePool version + * @property {google.cloud.gkemulticloud.v1.IAwsNodeConfig|null} [config] AwsNodePool config + * @property {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling|null} [autoscaling] AwsNodePool autoscaling + * @property {string|null} [subnetId] AwsNodePool subnetId + * @property {google.cloud.gkemulticloud.v1.AwsNodePool.State|null} [state] AwsNodePool state + * @property {string|null} [uid] AwsNodePool uid + * @property {boolean|null} [reconciling] AwsNodePool reconciling + * @property {google.protobuf.ITimestamp|null} [createTime] AwsNodePool createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AwsNodePool updateTime + * @property {string|null} [etag] AwsNodePool etag + * @property {Object.|null} [annotations] AwsNodePool annotations + * @property {google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null} [maxPodsConstraint] AwsNodePool maxPodsConstraint + * @property {Array.|null} [errors] AwsNodePool errors */ /** - * Constructs a new ListAwsNodePoolsResponse. + * Constructs a new AwsNodePool. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a ListAwsNodePoolsResponse. - * @implements IListAwsNodePoolsResponse + * @classdesc Represents an AwsNodePool. + * @implements IAwsNodePool * @constructor - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsNodePool=} [properties] Properties to set */ - function ListAwsNodePoolsResponse(properties) { - this.awsNodePools = []; + function AwsNodePool(properties) { + this.annotations = {}; + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10406,92 +10123,280 @@ } /** - * ListAwsNodePoolsResponse awsNodePools. - * @member {Array.} awsNodePools - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * AwsNodePool name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @instance */ - ListAwsNodePoolsResponse.prototype.awsNodePools = $util.emptyArray; + AwsNodePool.prototype.name = ""; /** - * ListAwsNodePoolsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * AwsNodePool version. + * @member {string} version + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @instance */ - ListAwsNodePoolsResponse.prototype.nextPageToken = ""; + AwsNodePool.prototype.version = ""; /** - * Creates a new ListAwsNodePoolsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse - * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} ListAwsNodePoolsResponse instance + * AwsNodePool config. + * @member {google.cloud.gkemulticloud.v1.IAwsNodeConfig|null|undefined} config + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance */ - ListAwsNodePoolsResponse.create = function create(properties) { - return new ListAwsNodePoolsResponse(properties); - }; + AwsNodePool.prototype.config = null; /** - * Encodes the specified ListAwsNodePoolsResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.verify|verify} messages. + * AwsNodePool autoscaling. + * @member {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling|null|undefined} autoscaling + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.autoscaling = null; + + /** + * AwsNodePool subnetId. + * @member {string} subnetId + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.subnetId = ""; + + /** + * AwsNodePool state. + * @member {google.cloud.gkemulticloud.v1.AwsNodePool.State} state + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.state = 0; + + /** + * AwsNodePool uid. + * @member {string} uid + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.uid = ""; + + /** + * AwsNodePool reconciling. + * @member {boolean} reconciling + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.reconciling = false; + + /** + * AwsNodePool createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.createTime = null; + + /** + * AwsNodePool updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.updateTime = null; + + /** + * AwsNodePool etag. + * @member {string} etag + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.etag = ""; + + /** + * AwsNodePool annotations. + * @member {Object.} annotations + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.annotations = $util.emptyObject; + + /** + * AwsNodePool maxPodsConstraint. + * @member {google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null|undefined} maxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.maxPodsConstraint = null; + + /** + * AwsNodePool errors. + * @member {Array.} errors + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @instance + */ + AwsNodePool.prototype.errors = $util.emptyArray; + + /** + * Creates a new AwsNodePool instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsNodePool=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsNodePool} AwsNodePool instance + */ + AwsNodePool.create = function create(properties) { + return new AwsNodePool(properties); + }; + + /** + * Encodes the specified AwsNodePool message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePool.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse} message ListAwsNodePoolsResponse message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsNodePool} message AwsNodePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAwsNodePoolsResponse.encode = function encode(message, writer) { + AwsNodePool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.awsNodePools != null && message.awsNodePools.length) - for (var i = 0; i < message.awsNodePools.length; ++i) - $root.google.cloud.gkemulticloud.v1.AwsNodePool.encode(message.awsNodePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); + if (message.subnetId != null && Object.hasOwnProperty.call(message, "subnetId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.subnetId); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.state); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.uid); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.reconciling); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.etag); + 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 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) + $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.maxPodsConstraint != null && Object.hasOwnProperty.call(message, "maxPodsConstraint")) + $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.encode(message.maxPodsConstraint, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.encode(message.config, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.gkemulticloud.v1.AwsNodePoolError.encode(message.errors[i], writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAwsNodePoolsResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.verify|verify} messages. + * Encodes the specified AwsNodePool message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @static - * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse} message ListAwsNodePoolsResponse message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsNodePool} message AwsNodePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAwsNodePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + AwsNodePool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAwsNodePoolsResponse message from the specified reader or buffer. + * Decodes an AwsNodePool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} ListAwsNodePoolsResponse + * @returns {google.cloud.gkemulticloud.v1.AwsNodePool} AwsNodePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAwsNodePoolsResponse.decode = function decode(reader, length) { + AwsNodePool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsNodePool(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.awsNodePools && message.awsNodePools.length)) - message.awsNodePools = []; - message.awsNodePools.push($root.google.cloud.gkemulticloud.v1.AwsNodePool.decode(reader, reader.uint32())); + message.name = reader.string(); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + message.version = reader.string(); + break; + } + case 28: { + message.config = $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.decode(reader, reader.uint32()); + break; + } + case 25: { + message.autoscaling = $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.decode(reader, reader.uint32()); + break; + } + case 6: { + message.subnetId = reader.string(); + break; + } + case 16: { + message.state = reader.int32(); + break; + } + case 17: { + message.uid = reader.string(); + break; + } + case 18: { + message.reconciling = reader.bool(); + break; + } + case 19: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 20: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 21: { + message.etag = reader.string(); + break; + } + case 22: { + 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 27: { + message.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.decode(reader, reader.uint32()); + break; + } + case 29: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.gkemulticloud.v1.AwsNodePoolError.decode(reader, reader.uint32())); break; } default: @@ -10503,151 +10408,369 @@ }; /** - * Decodes a ListAwsNodePoolsResponse message from the specified reader or buffer, length delimited. + * Decodes an AwsNodePool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} ListAwsNodePoolsResponse + * @returns {google.cloud.gkemulticloud.v1.AwsNodePool} AwsNodePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAwsNodePoolsResponse.decodeDelimited = function decodeDelimited(reader) { + AwsNodePool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAwsNodePoolsResponse message. + * Verifies an AwsNodePool message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAwsNodePoolsResponse.verify = function verify(message) { + AwsNodePool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.awsNodePools != null && message.hasOwnProperty("awsNodePools")) { - if (!Array.isArray(message.awsNodePools)) - return "awsNodePools: array expected"; - for (var i = 0; i < message.awsNodePools.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.AwsNodePool.verify(message.awsNodePools[i]); - if (error) - return "awsNodePools." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify(message.autoscaling); + if (error) + return "autoscaling." + error; + } + if (message.subnetId != null && message.hasOwnProperty("subnetId")) + if (!$util.isString(message.subnetId)) + return "subnetId: 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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: 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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: 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.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) { + var error = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify(message.maxPodsConstraint); + if (error) + return "maxPodsConstraint." + error; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AwsNodePoolError.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + /** - * Creates a ListAwsNodePoolsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AwsNodePool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} ListAwsNodePoolsResponse + * @returns {google.cloud.gkemulticloud.v1.AwsNodePool} AwsNodePool */ - ListAwsNodePoolsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) + AwsNodePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsNodePool) return object; - var message = new $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse(); - if (object.awsNodePools) { - if (!Array.isArray(object.awsNodePools)) - throw TypeError(".google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.awsNodePools: array expected"); - message.awsNodePools = []; - for (var i = 0; i < object.awsNodePools.length; ++i) { - if (typeof object.awsNodePools[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.awsNodePools: object expected"); - message.awsNodePools[i] = $root.google.cloud.gkemulticloud.v1.AwsNodePool.fromObject(object.awsNodePools[i]); + var message = new $root.google.cloud.gkemulticloud.v1.AwsNodePool(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.config: object expected"); + message.config = $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.fromObject(object.config); + } + if (object.autoscaling != null) { + if (typeof object.autoscaling !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.autoscaling: object expected"); + message.autoscaling = $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.fromObject(object.autoscaling); + } + if (object.subnetId != null) + message.subnetId = String(object.subnetId); + 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 "PROVISIONING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "RECONCILING": + case 3: + message.state = 3; + break; + case "STOPPING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + case "DEGRADED": + case 6: + message.state = 6; + break; + } + if (object.uid != null) + message.uid = String(object.uid); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.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.gkemulticloud.v1.AwsNodePool.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.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.maxPodsConstraint != null) { + if (typeof object.maxPodsConstraint !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.maxPodsConstraint: object expected"); + message.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.fromObject(object.maxPodsConstraint); + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodePool.errors: object expected"); + message.errors[i] = $root.google.cloud.gkemulticloud.v1.AwsNodePoolError.fromObject(object.errors[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListAwsNodePoolsResponse message. Also converts values to other types if specified. + * Creates a plain object from an AwsNodePool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @static - * @param {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} message ListAwsNodePoolsResponse + * @param {google.cloud.gkemulticloud.v1.AwsNodePool} message AwsNodePool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAwsNodePoolsResponse.toObject = function toObject(message, options) { + AwsNodePool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.awsNodePools = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.awsNodePools && message.awsNodePools.length) { - object.awsNodePools = []; - for (var j = 0; j < message.awsNodePools.length; ++j) - object.awsNodePools[j] = $root.google.cloud.gkemulticloud.v1.AwsNodePool.toObject(message.awsNodePools[j], options); + object.errors = []; + if (options.objects || options.defaults) + object.annotations = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + object.subnetId = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.uid = ""; + object.reconciling = false; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.autoscaling = null; + object.maxPodsConstraint = null; + object.config = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.subnetId != null && message.hasOwnProperty("subnetId")) + object.subnetId = message.subnetId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AwsNodePool.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AwsNodePool.State[message.state] : message.state; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + 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; + 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.autoscaling != null && message.hasOwnProperty("autoscaling")) + object.autoscaling = $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.toObject(message.autoscaling, options); + if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) + object.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.toObject(message.maxPodsConstraint, options); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.gkemulticloud.v1.AwsNodeConfig.toObject(message.config, options); + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.gkemulticloud.v1.AwsNodePoolError.toObject(message.errors[j], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListAwsNodePoolsResponse to JSON. + * Converts this AwsNodePool to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @instance * @returns {Object.} JSON object */ - ListAwsNodePoolsResponse.prototype.toJSON = function toJSON() { + AwsNodePool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAwsNodePoolsResponse + * Gets the default type url for AwsNodePool * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @memberof google.cloud.gkemulticloud.v1.AwsNodePool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAwsNodePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsNodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsNodePool"; }; - return ListAwsNodePoolsResponse; - })(); - - v1.DeleteAwsNodePoolRequest = (function() { - /** - * Properties of a DeleteAwsNodePoolRequest. - * @memberof google.cloud.gkemulticloud.v1 - * @interface IDeleteAwsNodePoolRequest - * @property {string|null} [name] DeleteAwsNodePoolRequest name - * @property {boolean|null} [validateOnly] DeleteAwsNodePoolRequest validateOnly - * @property {boolean|null} [allowMissing] DeleteAwsNodePoolRequest allowMissing - * @property {string|null} [etag] DeleteAwsNodePoolRequest etag + * State enum. + * @name google.cloud.gkemulticloud.v1.AwsNodePool.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PROVISIONING=1 PROVISIONING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} RECONCILING=3 RECONCILING value + * @property {number} STOPPING=4 STOPPING value + * @property {number} ERROR=5 ERROR value + * @property {number} DEGRADED=6 DEGRADED value */ + AwsNodePool.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "RECONCILING"] = 3; + values[valuesById[4] = "STOPPING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + values[valuesById[6] = "DEGRADED"] = 6; + return values; + })(); + + return AwsNodePool; + })(); + + v1.AwsNodeConfig = (function() { /** - * Constructs a new DeleteAwsNodePoolRequest. + * Properties of an AwsNodeConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a DeleteAwsNodePoolRequest. - * @implements IDeleteAwsNodePoolRequest + * @interface IAwsNodeConfig + * @property {string|null} [instanceType] AwsNodeConfig instanceType + * @property {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null} [rootVolume] AwsNodeConfig rootVolume + * @property {Array.|null} [taints] AwsNodeConfig taints + * @property {Object.|null} [labels] AwsNodeConfig labels + * @property {Object.|null} [tags] AwsNodeConfig tags + * @property {string|null} [iamInstanceProfile] AwsNodeConfig iamInstanceProfile + * @property {string|null} [imageType] AwsNodeConfig imageType + * @property {google.cloud.gkemulticloud.v1.IAwsSshConfig|null} [sshConfig] AwsNodeConfig sshConfig + * @property {Array.|null} [securityGroupIds] AwsNodeConfig securityGroupIds + * @property {google.cloud.gkemulticloud.v1.IAwsProxyConfig|null} [proxyConfig] AwsNodeConfig proxyConfig + * @property {google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null} [configEncryption] AwsNodeConfig configEncryption + * @property {google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null} [instancePlacement] AwsNodeConfig instancePlacement + * @property {google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection|null} [autoscalingMetricsCollection] AwsNodeConfig autoscalingMetricsCollection + */ + + /** + * Constructs a new AwsNodeConfig. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsNodeConfig. + * @implements IAwsNodeConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsNodeConfig=} [properties] Properties to set */ - function DeleteAwsNodePoolRequest(properties) { + function AwsNodeConfig(properties) { + this.taints = []; + this.labels = {}; + this.tags = {}; + this.securityGroupIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10655,269 +10778,604 @@ } /** - * DeleteAwsNodePoolRequest name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * AwsNodeConfig instanceType. + * @member {string} instanceType + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @instance */ - DeleteAwsNodePoolRequest.prototype.name = ""; + AwsNodeConfig.prototype.instanceType = ""; /** - * DeleteAwsNodePoolRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * AwsNodeConfig rootVolume. + * @member {google.cloud.gkemulticloud.v1.IAwsVolumeTemplate|null|undefined} rootVolume + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @instance */ - DeleteAwsNodePoolRequest.prototype.validateOnly = false; + AwsNodeConfig.prototype.rootVolume = null; /** - * DeleteAwsNodePoolRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * AwsNodeConfig taints. + * @member {Array.} taints + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @instance */ - DeleteAwsNodePoolRequest.prototype.allowMissing = false; + AwsNodeConfig.prototype.taints = $util.emptyArray; /** - * DeleteAwsNodePoolRequest etag. - * @member {string} etag - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * AwsNodeConfig labels. + * @member {Object.} labels + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @instance */ - DeleteAwsNodePoolRequest.prototype.etag = ""; + AwsNodeConfig.prototype.labels = $util.emptyObject; /** - * Creates a new DeleteAwsNodePoolRequest instance using the specified properties. + * AwsNodeConfig tags. + * @member {Object.} tags + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.tags = $util.emptyObject; + + /** + * AwsNodeConfig iamInstanceProfile. + * @member {string} iamInstanceProfile + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.iamInstanceProfile = ""; + + /** + * AwsNodeConfig imageType. + * @member {string} imageType + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.imageType = ""; + + /** + * AwsNodeConfig sshConfig. + * @member {google.cloud.gkemulticloud.v1.IAwsSshConfig|null|undefined} sshConfig + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.sshConfig = null; + + /** + * AwsNodeConfig securityGroupIds. + * @member {Array.} securityGroupIds + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.securityGroupIds = $util.emptyArray; + + /** + * AwsNodeConfig proxyConfig. + * @member {google.cloud.gkemulticloud.v1.IAwsProxyConfig|null|undefined} proxyConfig + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.proxyConfig = null; + + /** + * AwsNodeConfig configEncryption. + * @member {google.cloud.gkemulticloud.v1.IAwsConfigEncryption|null|undefined} configEncryption + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.configEncryption = null; + + /** + * AwsNodeConfig instancePlacement. + * @member {google.cloud.gkemulticloud.v1.IAwsInstancePlacement|null|undefined} instancePlacement + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.instancePlacement = null; + + /** + * AwsNodeConfig autoscalingMetricsCollection. + * @member {google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection|null|undefined} autoscalingMetricsCollection + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + */ + AwsNodeConfig.prototype.autoscalingMetricsCollection = null; + + /** + * Creates a new AwsNodeConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @static - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} DeleteAwsNodePoolRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsNodeConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsNodeConfig} AwsNodeConfig instance */ - DeleteAwsNodePoolRequest.create = function create(properties) { - return new DeleteAwsNodePoolRequest(properties); + AwsNodeConfig.create = function create(properties) { + return new AwsNodeConfig(properties); }; /** - * Encodes the specified DeleteAwsNodePoolRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.verify|verify} messages. + * Encodes the specified AwsNodeConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodeConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @static - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest} message DeleteAwsNodePoolRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsNodeConfig} message AwsNodeConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAwsNodePoolRequest.encode = function encode(message, writer) { + AwsNodeConfig.encode = function encode(message, writer) { 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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.instanceType != null && Object.hasOwnProperty.call(message, "instanceType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceType); + if (message.rootVolume != null && Object.hasOwnProperty.call(message, "rootVolume")) + $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.encode(message.rootVolume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.taints != null && message.taints.length) + for (var i = 0; i < message.taints.length; ++i) + $root.google.cloud.gkemulticloud.v1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + for (var keys = Object.keys(message.tags), 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.tags[keys[i]]).ldelim(); + if (message.iamInstanceProfile != null && Object.hasOwnProperty.call(message, "iamInstanceProfile")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.iamInstanceProfile); + if (message.sshConfig != null && Object.hasOwnProperty.call(message, "sshConfig")) + $root.google.cloud.gkemulticloud.v1.AwsSshConfig.encode(message.sshConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.securityGroupIds != null && message.securityGroupIds.length) + for (var i = 0; i < message.securityGroupIds.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.securityGroupIds[i]); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.imageType); + if (message.proxyConfig != null && Object.hasOwnProperty.call(message, "proxyConfig")) + $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.encode(message.proxyConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.configEncryption != null && Object.hasOwnProperty.call(message, "configEncryption")) + $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.encode(message.configEncryption, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.instancePlacement != null && Object.hasOwnProperty.call(message, "instancePlacement")) + $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.encode(message.instancePlacement, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.autoscalingMetricsCollection != null && Object.hasOwnProperty.call(message, "autoscalingMetricsCollection")) + $root.google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.encode(message.autoscalingMetricsCollection, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteAwsNodePoolRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.verify|verify} messages. + * Encodes the specified AwsNodeConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodeConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @static - * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest} message DeleteAwsNodePoolRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsNodeConfig} message AwsNodeConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAwsNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAwsNodePoolRequest message from the specified reader or buffer. + * Decodes an AwsNodeConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} DeleteAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsNodeConfig} AwsNodeConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAwsNodePoolRequest.decode = function decode(reader, length) { + AwsNodeConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsNodeConfig(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.instanceType = reader.string(); break; } case 2: { - message.validateOnly = reader.bool(); + message.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.decode(reader, reader.uint32()); break; } case 3: { - message.allowMissing = reader.bool(); + if (!(message.taints && message.taints.length)) + message.taints = []; + message.taints.push($root.google.cloud.gkemulticloud.v1.NodeTaint.decode(reader, reader.uint32())); break; } case 4: { - message.etag = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + 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 5: { + if (message.tags === $util.emptyObject) + message.tags = {}; + 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.tags[key] = value; + break; + } + case 6: { + message.iamInstanceProfile = reader.string(); + break; + } + case 11: { + message.imageType = reader.string(); + break; + } + case 9: { + message.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.securityGroupIds && message.securityGroupIds.length)) + message.securityGroupIds = []; + message.securityGroupIds.push(reader.string()); + break; + } + case 12: { + message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.decode(reader, reader.uint32()); + break; + } + case 13: { + message.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.decode(reader, reader.uint32()); + break; + } + case 14: { + message.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.decode(reader, reader.uint32()); + break; + } + case 15: { + message.autoscalingMetricsCollection = $root.google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Decodes a DeleteAwsNodePoolRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsNodeConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} DeleteAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsNodeConfig} AwsNodeConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAwsNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + AwsNodeConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAwsNodePoolRequest message. + * Verifies an AwsNodeConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAwsNodePoolRequest.verify = function verify(message) { + AwsNodeConfig.verify = function verify(message) { if (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.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; + if (message.instanceType != null && message.hasOwnProperty("instanceType")) + if (!$util.isString(message.instanceType)) + return "instanceType: string expected"; + if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.verify(message.rootVolume); + if (error) + return "rootVolume." + error; + } + if (message.taints != null && message.hasOwnProperty("taints")) { + if (!Array.isArray(message.taints)) + return "taints: array expected"; + for (var i = 0; i < message.taints.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.NodeTaint.verify(message.taints[i]); + if (error) + return "taints." + error; + } + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!$util.isObject(message.tags)) + return "tags: object expected"; + var key = Object.keys(message.tags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.tags[key[i]])) + return "tags: string{k:string} expected"; + } + if (message.iamInstanceProfile != null && message.hasOwnProperty("iamInstanceProfile")) + if (!$util.isString(message.iamInstanceProfile)) + return "iamInstanceProfile: string expected"; + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.verify(message.sshConfig); + if (error) + return "sshConfig." + error; + } + if (message.securityGroupIds != null && message.hasOwnProperty("securityGroupIds")) { + if (!Array.isArray(message.securityGroupIds)) + return "securityGroupIds: array expected"; + for (var i = 0; i < message.securityGroupIds.length; ++i) + if (!$util.isString(message.securityGroupIds[i])) + return "securityGroupIds: string[] expected"; + } + if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.verify(message.proxyConfig); + if (error) + return "proxyConfig." + error; + } + if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify(message.configEncryption); + if (error) + return "configEncryption." + error; + } + if (message.instancePlacement != null && message.hasOwnProperty("instancePlacement")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify(message.instancePlacement); + if (error) + return "instancePlacement." + error; + } + if (message.autoscalingMetricsCollection != null && message.hasOwnProperty("autoscalingMetricsCollection")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.verify(message.autoscalingMetricsCollection); + if (error) + return "autoscalingMetricsCollection." + error; + } return null; }; /** - * Creates a DeleteAwsNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsNodeConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} DeleteAwsNodePoolRequest + * @returns {google.cloud.gkemulticloud.v1.AwsNodeConfig} AwsNodeConfig */ - DeleteAwsNodePoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) + AwsNodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsNodeConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a DeleteAwsNodePoolRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest - * @static - * @param {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} message DeleteAwsNodePoolRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteAwsNodePoolRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.validateOnly = false; - object.allowMissing = false; - object.etag = ""; + var message = new $root.google.cloud.gkemulticloud.v1.AwsNodeConfig(); + if (object.instanceType != null) + message.instanceType = String(object.instanceType); + if (object.rootVolume != null) { + if (typeof object.rootVolume !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.rootVolume: object expected"); + message.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.fromObject(object.rootVolume); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this DeleteAwsNodePoolRequest to JSON. - * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteAwsNodePoolRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteAwsNodePoolRequest - * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteAwsNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (object.taints) { + if (!Array.isArray(object.taints)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.taints: array expected"); + message.taints = []; + for (var i = 0; i < object.taints.length; ++i) { + if (typeof object.taints[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.taints: object expected"); + message.taints[i] = $root.google.cloud.gkemulticloud.v1.NodeTaint.fromObject(object.taints[i]); + } + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.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.tags) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.tags: object expected"); + message.tags = {}; + for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) + message.tags[keys[i]] = String(object.tags[keys[i]]); + } + if (object.iamInstanceProfile != null) + message.iamInstanceProfile = String(object.iamInstanceProfile); + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.sshConfig != null) { + if (typeof object.sshConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.sshConfig: object expected"); + message.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.fromObject(object.sshConfig); + } + if (object.securityGroupIds) { + if (!Array.isArray(object.securityGroupIds)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.securityGroupIds: array expected"); + message.securityGroupIds = []; + for (var i = 0; i < object.securityGroupIds.length; ++i) + message.securityGroupIds[i] = String(object.securityGroupIds[i]); + } + if (object.proxyConfig != null) { + if (typeof object.proxyConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.proxyConfig: object expected"); + message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.fromObject(object.proxyConfig); + } + if (object.configEncryption != null) { + if (typeof object.configEncryption !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.configEncryption: object expected"); + message.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.fromObject(object.configEncryption); + } + if (object.instancePlacement != null) { + if (typeof object.instancePlacement !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.instancePlacement: object expected"); + message.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.fromObject(object.instancePlacement); + } + if (object.autoscalingMetricsCollection != null) { + if (typeof object.autoscalingMetricsCollection !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsNodeConfig.autoscalingMetricsCollection: object expected"); + message.autoscalingMetricsCollection = $root.google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.fromObject(object.autoscalingMetricsCollection); + } + return message; + }; + + /** + * Creates a plain object from an AwsNodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @static + * @param {google.cloud.gkemulticloud.v1.AwsNodeConfig} message AwsNodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsNodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.taints = []; + object.securityGroupIds = []; + } + if (options.objects || options.defaults) { + object.labels = {}; + object.tags = {}; + } + if (options.defaults) { + object.instanceType = ""; + object.rootVolume = null; + object.iamInstanceProfile = ""; + object.sshConfig = null; + object.imageType = ""; + object.proxyConfig = null; + object.configEncryption = null; + object.instancePlacement = null; + object.autoscalingMetricsCollection = null; + } + if (message.instanceType != null && message.hasOwnProperty("instanceType")) + object.instanceType = message.instanceType; + if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) + object.rootVolume = $root.google.cloud.gkemulticloud.v1.AwsVolumeTemplate.toObject(message.rootVolume, options); + if (message.taints && message.taints.length) { + object.taints = []; + for (var j = 0; j < message.taints.length; ++j) + object.taints[j] = $root.google.cloud.gkemulticloud.v1.NodeTaint.toObject(message.taints[j], options); + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.tags && (keys2 = Object.keys(message.tags)).length) { + object.tags = {}; + for (var j = 0; j < keys2.length; ++j) + object.tags[keys2[j]] = message.tags[keys2[j]]; + } + if (message.iamInstanceProfile != null && message.hasOwnProperty("iamInstanceProfile")) + object.iamInstanceProfile = message.iamInstanceProfile; + if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) + object.sshConfig = $root.google.cloud.gkemulticloud.v1.AwsSshConfig.toObject(message.sshConfig, options); + if (message.securityGroupIds && message.securityGroupIds.length) { + object.securityGroupIds = []; + for (var j = 0; j < message.securityGroupIds.length; ++j) + object.securityGroupIds[j] = message.securityGroupIds[j]; + } + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) + object.proxyConfig = $root.google.cloud.gkemulticloud.v1.AwsProxyConfig.toObject(message.proxyConfig, options); + if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) + object.configEncryption = $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption.toObject(message.configEncryption, options); + if (message.instancePlacement != null && message.hasOwnProperty("instancePlacement")) + object.instancePlacement = $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.toObject(message.instancePlacement, options); + if (message.autoscalingMetricsCollection != null && message.hasOwnProperty("autoscalingMetricsCollection")) + object.autoscalingMetricsCollection = $root.google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.toObject(message.autoscalingMetricsCollection, options); + return object; + }; + + /** + * Converts this AwsNodeConfig to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @instance + * @returns {Object.} JSON object + */ + AwsNodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsNodeConfig + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsNodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsNodeConfig"; }; - return DeleteAwsNodePoolRequest; + return AwsNodeConfig; })(); - v1.GetAwsServerConfigRequest = (function() { + v1.AwsNodePoolAutoscaling = (function() { /** - * Properties of a GetAwsServerConfigRequest. + * Properties of an AwsNodePoolAutoscaling. * @memberof google.cloud.gkemulticloud.v1 - * @interface IGetAwsServerConfigRequest - * @property {string|null} [name] GetAwsServerConfigRequest name + * @interface IAwsNodePoolAutoscaling + * @property {number|null} [minNodeCount] AwsNodePoolAutoscaling minNodeCount + * @property {number|null} [maxNodeCount] AwsNodePoolAutoscaling maxNodeCount */ /** - * Constructs a new GetAwsServerConfigRequest. + * Constructs a new AwsNodePoolAutoscaling. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a GetAwsServerConfigRequest. - * @implements IGetAwsServerConfigRequest + * @classdesc Represents an AwsNodePoolAutoscaling. + * @implements IAwsNodePoolAutoscaling * @constructor - * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling=} [properties] Properties to set */ - function GetAwsServerConfigRequest(properties) { + function AwsNodePoolAutoscaling(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10925,75 +11383,89 @@ } /** - * GetAwsServerConfigRequest name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * AwsNodePoolAutoscaling minNodeCount. + * @member {number} minNodeCount + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @instance */ - GetAwsServerConfigRequest.prototype.name = ""; + AwsNodePoolAutoscaling.prototype.minNodeCount = 0; /** - * Creates a new GetAwsServerConfigRequest instance using the specified properties. + * AwsNodePoolAutoscaling maxNodeCount. + * @member {number} maxNodeCount + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling + * @instance + */ + AwsNodePoolAutoscaling.prototype.maxNodeCount = 0; + + /** + * Creates a new AwsNodePoolAutoscaling instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} GetAwsServerConfigRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} AwsNodePoolAutoscaling instance */ - GetAwsServerConfigRequest.create = function create(properties) { - return new GetAwsServerConfigRequest(properties); + AwsNodePoolAutoscaling.create = function create(properties) { + return new AwsNodePoolAutoscaling(properties); }; /** - * Encodes the specified GetAwsServerConfigRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.verify|verify} messages. + * Encodes the specified AwsNodePoolAutoscaling message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest} message GetAwsServerConfigRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling} message AwsNodePoolAutoscaling message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAwsServerConfigRequest.encode = function encode(message, writer) { + AwsNodePoolAutoscaling.encode = function encode(message, writer) { 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.minNodeCount != null && Object.hasOwnProperty.call(message, "minNodeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minNodeCount); + if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxNodeCount); return writer; }; /** - * Encodes the specified GetAwsServerConfigRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.verify|verify} messages. + * Encodes the specified AwsNodePoolAutoscaling message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static - * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest} message GetAwsServerConfigRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolAutoscaling} message AwsNodePoolAutoscaling message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAwsServerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsNodePoolAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAwsServerConfigRequest message from the specified reader or buffer. + * Decodes an AwsNodePoolAutoscaling message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} GetAwsServerConfigRequest + * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} AwsNodePoolAutoscaling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAwsServerConfigRequest.decode = function decode(reader, length) { + AwsNodePoolAutoscaling.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.minNodeCount = reader.int32(); + break; + } + case 2: { + message.maxNodeCount = reader.int32(); break; } default: @@ -11005,122 +11477,135 @@ }; /** - * Decodes a GetAwsServerConfigRequest message from the specified reader or buffer, length delimited. + * Decodes an AwsNodePoolAutoscaling message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} GetAwsServerConfigRequest + * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} AwsNodePoolAutoscaling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAwsServerConfigRequest.decodeDelimited = function decodeDelimited(reader) { + AwsNodePoolAutoscaling.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAwsServerConfigRequest message. + * Verifies an AwsNodePoolAutoscaling message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAwsServerConfigRequest.verify = function verify(message) { + AwsNodePoolAutoscaling.verify = function verify(message) { if (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.minNodeCount != null && message.hasOwnProperty("minNodeCount")) + if (!$util.isInteger(message.minNodeCount)) + return "minNodeCount: integer expected"; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + if (!$util.isInteger(message.maxNodeCount)) + return "maxNodeCount: integer expected"; return null; }; /** - * Creates a GetAwsServerConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AwsNodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} GetAwsServerConfigRequest + * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} AwsNodePoolAutoscaling */ - GetAwsServerConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) + AwsNodePoolAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling) return object; - var message = new $root.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling(); + if (object.minNodeCount != null) + message.minNodeCount = object.minNodeCount | 0; + if (object.maxNodeCount != null) + message.maxNodeCount = object.maxNodeCount | 0; return message; }; /** - * Creates a plain object from a GetAwsServerConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from an AwsNodePoolAutoscaling message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static - * @param {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} message GetAwsServerConfigRequest + * @param {google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling} message AwsNodePoolAutoscaling * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAwsServerConfigRequest.toObject = function toObject(message, options) { + AwsNodePoolAutoscaling.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.minNodeCount = 0; + object.maxNodeCount = 0; + } + if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) + object.minNodeCount = message.minNodeCount; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + object.maxNodeCount = message.maxNodeCount; return object; }; /** - * Converts this GetAwsServerConfigRequest to JSON. + * Converts this AwsNodePoolAutoscaling to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @instance * @returns {Object.} JSON object */ - GetAwsServerConfigRequest.prototype.toJSON = function toJSON() { + AwsNodePoolAutoscaling.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetAwsServerConfigRequest + * Gets the default type url for AwsNodePoolAutoscaling * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetAwsServerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsNodePoolAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling"; }; - return GetAwsServerConfigRequest; + return AwsNodePoolAutoscaling; })(); - v1.GenerateAwsAccessTokenRequest = (function() { + v1.AwsServerConfig = (function() { /** - * Properties of a GenerateAwsAccessTokenRequest. + * Properties of an AwsServerConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IGenerateAwsAccessTokenRequest - * @property {string|null} [awsCluster] GenerateAwsAccessTokenRequest awsCluster + * @interface IAwsServerConfig + * @property {string|null} [name] AwsServerConfig name + * @property {Array.|null} [validVersions] AwsServerConfig validVersions + * @property {Array.|null} [supportedAwsRegions] AwsServerConfig supportedAwsRegions */ /** - * Constructs a new GenerateAwsAccessTokenRequest. + * Constructs a new AwsServerConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a GenerateAwsAccessTokenRequest. - * @implements IGenerateAwsAccessTokenRequest + * @classdesc Represents an AwsServerConfig. + * @implements IAwsServerConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAwsServerConfig=} [properties] Properties to set */ - function GenerateAwsAccessTokenRequest(properties) { + function AwsServerConfig(properties) { + this.validVersions = []; + this.supportedAwsRegions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11128,75 +11613,109 @@ } /** - * GenerateAwsAccessTokenRequest awsCluster. - * @member {string} awsCluster - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * AwsServerConfig name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig * @instance */ - GenerateAwsAccessTokenRequest.prototype.awsCluster = ""; + AwsServerConfig.prototype.name = ""; /** - * Creates a new GenerateAwsAccessTokenRequest instance using the specified properties. + * AwsServerConfig validVersions. + * @member {Array.} validVersions + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @instance + */ + AwsServerConfig.prototype.validVersions = $util.emptyArray; + + /** + * AwsServerConfig supportedAwsRegions. + * @member {Array.} supportedAwsRegions + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @instance + */ + AwsServerConfig.prototype.supportedAwsRegions = $util.emptyArray; + + /** + * Creates a new AwsServerConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} GenerateAwsAccessTokenRequest instance + * @param {google.cloud.gkemulticloud.v1.IAwsServerConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsServerConfig} AwsServerConfig instance */ - GenerateAwsAccessTokenRequest.create = function create(properties) { - return new GenerateAwsAccessTokenRequest(properties); + AwsServerConfig.create = function create(properties) { + return new AwsServerConfig(properties); }; /** - * Encodes the specified GenerateAwsAccessTokenRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.verify|verify} messages. + * Encodes the specified AwsServerConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServerConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest} message GenerateAwsAccessTokenRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsServerConfig} message AwsServerConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateAwsAccessTokenRequest.encode = function encode(message, writer) { + AwsServerConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.awsCluster != null && Object.hasOwnProperty.call(message, "awsCluster")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.awsCluster); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.validVersions != null && message.validVersions.length) + for (var i = 0; i < message.validVersions.length; ++i) + $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.encode(message.validVersions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.supportedAwsRegions != null && message.supportedAwsRegions.length) + for (var i = 0; i < message.supportedAwsRegions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedAwsRegions[i]); return writer; }; /** - * Encodes the specified GenerateAwsAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.verify|verify} messages. + * Encodes the specified AwsServerConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsServerConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest} message GenerateAwsAccessTokenRequest message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAwsServerConfig} message AwsServerConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateAwsAccessTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + AwsServerConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerateAwsAccessTokenRequest message from the specified reader or buffer. + * Decodes an AwsServerConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} GenerateAwsAccessTokenRequest + * @returns {google.cloud.gkemulticloud.v1.AwsServerConfig} AwsServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateAwsAccessTokenRequest.decode = function decode(reader, length) { + AwsServerConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsServerConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.awsCluster = reader.string(); + message.name = reader.string(); + break; + } + case 2: { + if (!(message.validVersions && message.validVersions.length)) + message.validVersions = []; + message.validVersions.push($root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.supportedAwsRegions && message.supportedAwsRegions.length)) + message.supportedAwsRegions = []; + message.supportedAwsRegions.push(reader.string()); break; } default: @@ -11208,123 +11727,6888 @@ }; /** - * Decodes a GenerateAwsAccessTokenRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} GenerateAwsAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerateAwsAccessTokenRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenerateAwsAccessTokenRequest message. - * @function verify - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenerateAwsAccessTokenRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) - if (!$util.isString(message.awsCluster)) - return "awsCluster: string expected"; - return null; - }; - - /** - * Creates a GenerateAwsAccessTokenRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} GenerateAwsAccessTokenRequest - */ - GenerateAwsAccessTokenRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) - return object; - var message = new $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest(); - if (object.awsCluster != null) - message.awsCluster = String(object.awsCluster); - return message; - }; - - /** - * Creates a plain object from a GenerateAwsAccessTokenRequest message. Also converts values to other types if specified. + * Decodes an AwsServerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsServerConfig} AwsServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsServerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsServerConfig message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsServerConfig.verify = function verify(message) { + if (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.validVersions != null && message.hasOwnProperty("validVersions")) { + if (!Array.isArray(message.validVersions)) + return "validVersions: array expected"; + for (var i = 0; i < message.validVersions.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify(message.validVersions[i]); + if (error) + return "validVersions." + error; + } + } + if (message.supportedAwsRegions != null && message.hasOwnProperty("supportedAwsRegions")) { + if (!Array.isArray(message.supportedAwsRegions)) + return "supportedAwsRegions: array expected"; + for (var i = 0; i < message.supportedAwsRegions.length; ++i) + if (!$util.isString(message.supportedAwsRegions[i])) + return "supportedAwsRegions: string[] expected"; + } + return null; + }; + + /** + * Creates an AwsServerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsServerConfig} AwsServerConfig + */ + AwsServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsServerConfig) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsServerConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.validVersions) { + if (!Array.isArray(object.validVersions)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsServerConfig.validVersions: array expected"); + message.validVersions = []; + for (var i = 0; i < object.validVersions.length; ++i) { + if (typeof object.validVersions[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AwsServerConfig.validVersions: object expected"); + message.validVersions[i] = $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.fromObject(object.validVersions[i]); + } + } + if (object.supportedAwsRegions) { + if (!Array.isArray(object.supportedAwsRegions)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsServerConfig.supportedAwsRegions: array expected"); + message.supportedAwsRegions = []; + for (var i = 0; i < object.supportedAwsRegions.length; ++i) + message.supportedAwsRegions[i] = String(object.supportedAwsRegions[i]); + } + return message; + }; + + /** + * Creates a plain object from an AwsServerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @static + * @param {google.cloud.gkemulticloud.v1.AwsServerConfig} message AwsServerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsServerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.validVersions = []; + object.supportedAwsRegions = []; + } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validVersions && message.validVersions.length) { + object.validVersions = []; + for (var j = 0; j < message.validVersions.length; ++j) + object.validVersions[j] = $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.toObject(message.validVersions[j], options); + } + if (message.supportedAwsRegions && message.supportedAwsRegions.length) { + object.supportedAwsRegions = []; + for (var j = 0; j < message.supportedAwsRegions.length; ++j) + object.supportedAwsRegions[j] = message.supportedAwsRegions[j]; + } + return object; + }; + + /** + * Converts this AwsServerConfig to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @instance + * @returns {Object.} JSON object + */ + AwsServerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsServerConfig + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsServerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsServerConfig"; + }; + + return AwsServerConfig; + })(); + + v1.AwsK8sVersionInfo = (function() { + + /** + * Properties of an AwsK8sVersionInfo. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsK8sVersionInfo + * @property {string|null} [version] AwsK8sVersionInfo version + */ + + /** + * Constructs a new AwsK8sVersionInfo. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsK8sVersionInfo. + * @implements IAwsK8sVersionInfo + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo=} [properties] Properties to set + */ + function AwsK8sVersionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsK8sVersionInfo version. + * @member {string} version + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @instance + */ + AwsK8sVersionInfo.prototype.version = ""; + + /** + * Creates a new AwsK8sVersionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} AwsK8sVersionInfo instance + */ + AwsK8sVersionInfo.create = function create(properties) { + return new AwsK8sVersionInfo(properties); + }; + + /** + * Encodes the specified AwsK8sVersionInfo message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo} message AwsK8sVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsK8sVersionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + return writer; + }; + + /** + * Encodes the specified AwsK8sVersionInfo message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsK8sVersionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsK8sVersionInfo} message AwsK8sVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsK8sVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsK8sVersionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} AwsK8sVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsK8sVersionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsK8sVersionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} AwsK8sVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsK8sVersionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsK8sVersionInfo message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsK8sVersionInfo.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"; + return null; + }; + + /** + * Creates an AwsK8sVersionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} AwsK8sVersionInfo + */ + AwsK8sVersionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsK8sVersionInfo(); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from an AwsK8sVersionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {google.cloud.gkemulticloud.v1.AwsK8sVersionInfo} message AwsK8sVersionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsK8sVersionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this AwsK8sVersionInfo to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @instance + * @returns {Object.} JSON object + */ + AwsK8sVersionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsK8sVersionInfo + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsK8sVersionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsK8sVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsK8sVersionInfo"; + }; + + return AwsK8sVersionInfo; + })(); + + v1.AwsSshConfig = (function() { + + /** + * Properties of an AwsSshConfig. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsSshConfig + * @property {string|null} [ec2KeyPair] AwsSshConfig ec2KeyPair + */ + + /** + * Constructs a new AwsSshConfig. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsSshConfig. + * @implements IAwsSshConfig + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsSshConfig=} [properties] Properties to set + */ + function AwsSshConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsSshConfig ec2KeyPair. + * @member {string} ec2KeyPair + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @instance + */ + AwsSshConfig.prototype.ec2KeyPair = ""; + + /** + * Creates a new AwsSshConfig instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsSshConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsSshConfig} AwsSshConfig instance + */ + AwsSshConfig.create = function create(properties) { + return new AwsSshConfig(properties); + }; + + /** + * Encodes the specified AwsSshConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsSshConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsSshConfig} message AwsSshConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsSshConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ec2KeyPair != null && Object.hasOwnProperty.call(message, "ec2KeyPair")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ec2KeyPair); + return writer; + }; + + /** + * Encodes the specified AwsSshConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsSshConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsSshConfig} message AwsSshConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsSshConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsSshConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AwsSshConfig} AwsSshConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsSshConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsSshConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ec2KeyPair = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsSshConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsSshConfig} AwsSshConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsSshConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsSshConfig message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsSshConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ec2KeyPair != null && message.hasOwnProperty("ec2KeyPair")) + if (!$util.isString(message.ec2KeyPair)) + return "ec2KeyPair: string expected"; + return null; + }; + + /** + * Creates an AwsSshConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsSshConfig} AwsSshConfig + */ + AwsSshConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsSshConfig) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsSshConfig(); + if (object.ec2KeyPair != null) + message.ec2KeyPair = String(object.ec2KeyPair); + return message; + }; + + /** + * Creates a plain object from an AwsSshConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {google.cloud.gkemulticloud.v1.AwsSshConfig} message AwsSshConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsSshConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.ec2KeyPair = ""; + if (message.ec2KeyPair != null && message.hasOwnProperty("ec2KeyPair")) + object.ec2KeyPair = message.ec2KeyPair; + return object; + }; + + /** + * Converts this AwsSshConfig to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @instance + * @returns {Object.} JSON object + */ + AwsSshConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsSshConfig + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsSshConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsSshConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsSshConfig"; + }; + + return AwsSshConfig; + })(); + + v1.AwsProxyConfig = (function() { + + /** + * Properties of an AwsProxyConfig. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsProxyConfig + * @property {string|null} [secretArn] AwsProxyConfig secretArn + * @property {string|null} [secretVersion] AwsProxyConfig secretVersion + */ + + /** + * Constructs a new AwsProxyConfig. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsProxyConfig. + * @implements IAwsProxyConfig + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsProxyConfig=} [properties] Properties to set + */ + function AwsProxyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsProxyConfig secretArn. + * @member {string} secretArn + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @instance + */ + AwsProxyConfig.prototype.secretArn = ""; + + /** + * AwsProxyConfig secretVersion. + * @member {string} secretVersion + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @instance + */ + AwsProxyConfig.prototype.secretVersion = ""; + + /** + * Creates a new AwsProxyConfig instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsProxyConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsProxyConfig} AwsProxyConfig instance + */ + AwsProxyConfig.create = function create(properties) { + return new AwsProxyConfig(properties); + }; + + /** + * Encodes the specified AwsProxyConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsProxyConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsProxyConfig} message AwsProxyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsProxyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secretArn != null && Object.hasOwnProperty.call(message, "secretArn")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.secretArn); + if (message.secretVersion != null && Object.hasOwnProperty.call(message, "secretVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.secretVersion); + return writer; + }; + + /** + * Encodes the specified AwsProxyConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsProxyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsProxyConfig} message AwsProxyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsProxyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsProxyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AwsProxyConfig} AwsProxyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsProxyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsProxyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.secretArn = reader.string(); + break; + } + case 2: { + message.secretVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsProxyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsProxyConfig} AwsProxyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsProxyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsProxyConfig message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsProxyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.secretArn != null && message.hasOwnProperty("secretArn")) + if (!$util.isString(message.secretArn)) + return "secretArn: string expected"; + if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) + if (!$util.isString(message.secretVersion)) + return "secretVersion: string expected"; + return null; + }; + + /** + * Creates an AwsProxyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsProxyConfig} AwsProxyConfig + */ + AwsProxyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsProxyConfig) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsProxyConfig(); + if (object.secretArn != null) + message.secretArn = String(object.secretArn); + if (object.secretVersion != null) + message.secretVersion = String(object.secretVersion); + return message; + }; + + /** + * Creates a plain object from an AwsProxyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {google.cloud.gkemulticloud.v1.AwsProxyConfig} message AwsProxyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsProxyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.secretArn = ""; + object.secretVersion = ""; + } + if (message.secretArn != null && message.hasOwnProperty("secretArn")) + object.secretArn = message.secretArn; + if (message.secretVersion != null && message.hasOwnProperty("secretVersion")) + object.secretVersion = message.secretVersion; + return object; + }; + + /** + * Converts this AwsProxyConfig to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @instance + * @returns {Object.} JSON object + */ + AwsProxyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsProxyConfig + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsProxyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsProxyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsProxyConfig"; + }; + + return AwsProxyConfig; + })(); + + v1.AwsConfigEncryption = (function() { + + /** + * Properties of an AwsConfigEncryption. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsConfigEncryption + * @property {string|null} [kmsKeyArn] AwsConfigEncryption kmsKeyArn + */ + + /** + * Constructs a new AwsConfigEncryption. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsConfigEncryption. + * @implements IAwsConfigEncryption + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsConfigEncryption=} [properties] Properties to set + */ + function AwsConfigEncryption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsConfigEncryption kmsKeyArn. + * @member {string} kmsKeyArn + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @instance + */ + AwsConfigEncryption.prototype.kmsKeyArn = ""; + + /** + * Creates a new AwsConfigEncryption instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsConfigEncryption=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsConfigEncryption} AwsConfigEncryption instance + */ + AwsConfigEncryption.create = function create(properties) { + return new AwsConfigEncryption(properties); + }; + + /** + * Encodes the specified AwsConfigEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsConfigEncryption} message AwsConfigEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsConfigEncryption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyArn != null && Object.hasOwnProperty.call(message, "kmsKeyArn")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyArn); + return writer; + }; + + /** + * Encodes the specified AwsConfigEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsConfigEncryption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsConfigEncryption} message AwsConfigEncryption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsConfigEncryption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsConfigEncryption message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AwsConfigEncryption} AwsConfigEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsConfigEncryption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kmsKeyArn = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsConfigEncryption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsConfigEncryption} AwsConfigEncryption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsConfigEncryption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsConfigEncryption message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsConfigEncryption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) + if (!$util.isString(message.kmsKeyArn)) + return "kmsKeyArn: string expected"; + return null; + }; + + /** + * Creates an AwsConfigEncryption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsConfigEncryption} AwsConfigEncryption + */ + AwsConfigEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsConfigEncryption(); + if (object.kmsKeyArn != null) + message.kmsKeyArn = String(object.kmsKeyArn); + return message; + }; + + /** + * Creates a plain object from an AwsConfigEncryption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {google.cloud.gkemulticloud.v1.AwsConfigEncryption} message AwsConfigEncryption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsConfigEncryption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyArn = ""; + if (message.kmsKeyArn != null && message.hasOwnProperty("kmsKeyArn")) + object.kmsKeyArn = message.kmsKeyArn; + return object; + }; + + /** + * Converts this AwsConfigEncryption to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @instance + * @returns {Object.} JSON object + */ + AwsConfigEncryption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsConfigEncryption + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsConfigEncryption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsConfigEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsConfigEncryption"; + }; + + return AwsConfigEncryption; + })(); + + v1.AwsInstancePlacement = (function() { + + /** + * Properties of an AwsInstancePlacement. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsInstancePlacement + * @property {google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy|null} [tenancy] AwsInstancePlacement tenancy + */ + + /** + * Constructs a new AwsInstancePlacement. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsInstancePlacement. + * @implements IAwsInstancePlacement + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsInstancePlacement=} [properties] Properties to set + */ + function AwsInstancePlacement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsInstancePlacement tenancy. + * @member {google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy} tenancy + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @instance + */ + AwsInstancePlacement.prototype.tenancy = 0; + + /** + * Creates a new AwsInstancePlacement instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsInstancePlacement=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsInstancePlacement} AwsInstancePlacement instance + */ + AwsInstancePlacement.create = function create(properties) { + return new AwsInstancePlacement(properties); + }; + + /** + * Encodes the specified AwsInstancePlacement message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsInstancePlacement} message AwsInstancePlacement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsInstancePlacement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tenancy != null && Object.hasOwnProperty.call(message, "tenancy")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tenancy); + return writer; + }; + + /** + * Encodes the specified AwsInstancePlacement message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsInstancePlacement.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsInstancePlacement} message AwsInstancePlacement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsInstancePlacement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsInstancePlacement message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AwsInstancePlacement} AwsInstancePlacement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsInstancePlacement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tenancy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsInstancePlacement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsInstancePlacement} AwsInstancePlacement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsInstancePlacement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsInstancePlacement message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsInstancePlacement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tenancy != null && message.hasOwnProperty("tenancy")) + switch (message.tenancy) { + default: + return "tenancy: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an AwsInstancePlacement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsInstancePlacement} AwsInstancePlacement + */ + AwsInstancePlacement.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement(); + switch (object.tenancy) { + default: + if (typeof object.tenancy === "number") { + message.tenancy = object.tenancy; + break; + } + break; + case "TENANCY_UNSPECIFIED": + case 0: + message.tenancy = 0; + break; + case "DEFAULT": + case 1: + message.tenancy = 1; + break; + case "DEDICATED": + case 2: + message.tenancy = 2; + break; + case "HOST": + case 3: + message.tenancy = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an AwsInstancePlacement message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {google.cloud.gkemulticloud.v1.AwsInstancePlacement} message AwsInstancePlacement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsInstancePlacement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tenancy = options.enums === String ? "TENANCY_UNSPECIFIED" : 0; + if (message.tenancy != null && message.hasOwnProperty("tenancy")) + object.tenancy = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy[message.tenancy] === undefined ? message.tenancy : $root.google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy[message.tenancy] : message.tenancy; + return object; + }; + + /** + * Converts this AwsInstancePlacement to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @instance + * @returns {Object.} JSON object + */ + AwsInstancePlacement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsInstancePlacement + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsInstancePlacement + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsInstancePlacement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsInstancePlacement"; + }; + + /** + * Tenancy enum. + * @name google.cloud.gkemulticloud.v1.AwsInstancePlacement.Tenancy + * @enum {number} + * @property {number} TENANCY_UNSPECIFIED=0 TENANCY_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} DEDICATED=2 DEDICATED value + * @property {number} HOST=3 HOST value + */ + AwsInstancePlacement.Tenancy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TENANCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "DEDICATED"] = 2; + values[valuesById[3] = "HOST"] = 3; + return values; + })(); + + return AwsInstancePlacement; + })(); + + v1.AwsAutoscalingGroupMetricsCollection = (function() { + + /** + * Properties of an AwsAutoscalingGroupMetricsCollection. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsAutoscalingGroupMetricsCollection + * @property {string|null} [granularity] AwsAutoscalingGroupMetricsCollection granularity + * @property {Array.|null} [metrics] AwsAutoscalingGroupMetricsCollection metrics + */ + + /** + * Constructs a new AwsAutoscalingGroupMetricsCollection. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsAutoscalingGroupMetricsCollection. + * @implements IAwsAutoscalingGroupMetricsCollection + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection=} [properties] Properties to set + */ + function AwsAutoscalingGroupMetricsCollection(properties) { + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsAutoscalingGroupMetricsCollection granularity. + * @member {string} granularity + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @instance + */ + AwsAutoscalingGroupMetricsCollection.prototype.granularity = ""; + + /** + * AwsAutoscalingGroupMetricsCollection metrics. + * @member {Array.} metrics + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @instance + */ + AwsAutoscalingGroupMetricsCollection.prototype.metrics = $util.emptyArray; + + /** + * Creates a new AwsAutoscalingGroupMetricsCollection instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection} AwsAutoscalingGroupMetricsCollection instance + */ + AwsAutoscalingGroupMetricsCollection.create = function create(properties) { + return new AwsAutoscalingGroupMetricsCollection(properties); + }; + + /** + * Encodes the specified AwsAutoscalingGroupMetricsCollection message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection} message AwsAutoscalingGroupMetricsCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAutoscalingGroupMetricsCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.granularity != null && Object.hasOwnProperty.call(message, "granularity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.granularity); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metrics[i]); + return writer; + }; + + /** + * Encodes the specified AwsAutoscalingGroupMetricsCollection message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsAutoscalingGroupMetricsCollection} message AwsAutoscalingGroupMetricsCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAutoscalingGroupMetricsCollection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsAutoscalingGroupMetricsCollection message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection} AwsAutoscalingGroupMetricsCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsAutoscalingGroupMetricsCollection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.granularity = reader.string(); + break; + } + case 2: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsAutoscalingGroupMetricsCollection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection} AwsAutoscalingGroupMetricsCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsAutoscalingGroupMetricsCollection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsAutoscalingGroupMetricsCollection message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsAutoscalingGroupMetricsCollection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.granularity != null && message.hasOwnProperty("granularity")) + if (!$util.isString(message.granularity)) + return "granularity: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) + if (!$util.isString(message.metrics[i])) + return "metrics: string[] expected"; + } + return null; + }; + + /** + * Creates an AwsAutoscalingGroupMetricsCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection} AwsAutoscalingGroupMetricsCollection + */ + AwsAutoscalingGroupMetricsCollection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection(); + if (object.granularity != null) + message.granularity = String(object.granularity); + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) + message.metrics[i] = String(object.metrics[i]); + } + return message; + }; + + /** + * Creates a plain object from an AwsAutoscalingGroupMetricsCollection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection} message AwsAutoscalingGroupMetricsCollection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsAutoscalingGroupMetricsCollection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metrics = []; + if (options.defaults) + object.granularity = ""; + if (message.granularity != null && message.hasOwnProperty("granularity")) + object.granularity = message.granularity; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = message.metrics[j]; + } + return object; + }; + + /** + * Converts this AwsAutoscalingGroupMetricsCollection to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @instance + * @returns {Object.} JSON object + */ + AwsAutoscalingGroupMetricsCollection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsAutoscalingGroupMetricsCollection + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsAutoscalingGroupMetricsCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsAutoscalingGroupMetricsCollection"; + }; + + return AwsAutoscalingGroupMetricsCollection; + })(); + + v1.AwsClusterError = (function() { + + /** + * Properties of an AwsClusterError. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsClusterError + * @property {string|null} [message] AwsClusterError message + */ + + /** + * Constructs a new AwsClusterError. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsClusterError. + * @implements IAwsClusterError + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsClusterError=} [properties] Properties to set + */ + function AwsClusterError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsClusterError message. + * @member {string} message + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @instance + */ + AwsClusterError.prototype.message = ""; + + /** + * Creates a new AwsClusterError instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsClusterError=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsClusterError} AwsClusterError instance + */ + AwsClusterError.create = function create(properties) { + return new AwsClusterError(properties); + }; + + /** + * Encodes the specified AwsClusterError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterError.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsClusterError} message AwsClusterError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsClusterError.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); + return writer; + }; + + /** + * Encodes the specified AwsClusterError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsClusterError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsClusterError} message AwsClusterError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsClusterError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsClusterError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AwsClusterError} AwsClusterError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsClusterError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsClusterError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsClusterError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsClusterError} AwsClusterError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsClusterError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsClusterError message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsClusterError.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"; + return null; + }; + + /** + * Creates an AwsClusterError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsClusterError} AwsClusterError + */ + AwsClusterError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsClusterError) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsClusterError(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an AwsClusterError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {google.cloud.gkemulticloud.v1.AwsClusterError} message AwsClusterError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsClusterError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this AwsClusterError to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @instance + * @returns {Object.} JSON object + */ + AwsClusterError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsClusterError + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsClusterError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsClusterError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsClusterError"; + }; + + return AwsClusterError; + })(); + + v1.AwsNodePoolError = (function() { + + /** + * Properties of an AwsNodePoolError. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAwsNodePoolError + * @property {string|null} [message] AwsNodePoolError message + */ + + /** + * Constructs a new AwsNodePoolError. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsNodePoolError. + * @implements IAwsNodePoolError + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolError=} [properties] Properties to set + */ + function AwsNodePoolError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsNodePoolError message. + * @member {string} message + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @instance + */ + AwsNodePoolError.prototype.message = ""; + + /** + * Creates a new AwsNodePoolError instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolError=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolError} AwsNodePoolError instance + */ + AwsNodePoolError.create = function create(properties) { + return new AwsNodePoolError(properties); + }; + + /** + * Encodes the specified AwsNodePoolError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolError.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolError} message AwsNodePoolError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsNodePoolError.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); + return writer; + }; + + /** + * Encodes the specified AwsNodePoolError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AwsNodePoolError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {google.cloud.gkemulticloud.v1.IAwsNodePoolError} message AwsNodePoolError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsNodePoolError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsNodePoolError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolError} AwsNodePoolError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsNodePoolError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AwsNodePoolError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsNodePoolError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolError} AwsNodePoolError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsNodePoolError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsNodePoolError message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsNodePoolError.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"; + return null; + }; + + /** + * Creates an AwsNodePoolError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AwsNodePoolError} AwsNodePoolError + */ + AwsNodePoolError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AwsNodePoolError) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AwsNodePoolError(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an AwsNodePoolError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {google.cloud.gkemulticloud.v1.AwsNodePoolError} message AwsNodePoolError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsNodePoolError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this AwsNodePoolError to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @instance + * @returns {Object.} JSON object + */ + AwsNodePoolError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsNodePoolError + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AwsNodePoolError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsNodePoolError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AwsNodePoolError"; + }; + + return AwsNodePoolError; + })(); + + v1.AwsClusters = (function() { + + /** + * Constructs a new AwsClusters service. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AwsClusters + * @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 AwsClusters(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AwsClusters.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AwsClusters; + + /** + * Creates new AwsClusters service using the specified rpc implementation. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @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 {AwsClusters} RPC service. Useful where requests and/or responses are streamed. + */ + AwsClusters.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|createAwsCluster}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef CreateAwsClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAwsCluster. + * @function createAwsCluster + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest} request CreateAwsClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.createAwsCluster = function createAwsCluster(request, callback) { + return this.rpcCall(createAwsCluster, $root.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAwsCluster" }); + + /** + * Calls CreateAwsCluster. + * @function createAwsCluster + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest} request CreateAwsClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|updateAwsCluster}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef UpdateAwsClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAwsCluster. + * @function updateAwsCluster + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest} request UpdateAwsClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.updateAwsCluster = function updateAwsCluster(request, callback) { + return this.rpcCall(updateAwsCluster, $root.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAwsCluster" }); + + /** + * Calls UpdateAwsCluster. + * @function updateAwsCluster + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest} request UpdateAwsClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|getAwsCluster}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef GetAwsClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.AwsCluster} [response] AwsCluster + */ + + /** + * Calls GetAwsCluster. + * @function getAwsCluster + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest} request GetAwsClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.GetAwsClusterCallback} callback Node-style callback called with the error, if any, and AwsCluster + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.getAwsCluster = function getAwsCluster(request, callback) { + return this.rpcCall(getAwsCluster, $root.google.cloud.gkemulticloud.v1.GetAwsClusterRequest, $root.google.cloud.gkemulticloud.v1.AwsCluster, request, callback); + }, "name", { value: "GetAwsCluster" }); + + /** + * Calls GetAwsCluster. + * @function getAwsCluster + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest} request GetAwsClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|listAwsClusters}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef ListAwsClustersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} [response] ListAwsClustersResponse + */ + + /** + * Calls ListAwsClusters. + * @function listAwsClusters + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest} request ListAwsClustersRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClustersCallback} callback Node-style callback called with the error, if any, and ListAwsClustersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.listAwsClusters = function listAwsClusters(request, callback) { + return this.rpcCall(listAwsClusters, $root.google.cloud.gkemulticloud.v1.ListAwsClustersRequest, $root.google.cloud.gkemulticloud.v1.ListAwsClustersResponse, request, callback); + }, "name", { value: "ListAwsClusters" }); + + /** + * Calls ListAwsClusters. + * @function listAwsClusters + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest} request ListAwsClustersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|deleteAwsCluster}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef DeleteAwsClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAwsCluster. + * @function deleteAwsCluster + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest} request DeleteAwsClusterRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.deleteAwsCluster = function deleteAwsCluster(request, callback) { + return this.rpcCall(deleteAwsCluster, $root.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAwsCluster" }); + + /** + * Calls DeleteAwsCluster. + * @function deleteAwsCluster + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest} request DeleteAwsClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|generateAwsAccessToken}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef GenerateAwsAccessTokenCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} [response] GenerateAwsAccessTokenResponse + */ + + /** + * Calls GenerateAwsAccessToken. + * @function generateAwsAccessToken + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest} request GenerateAwsAccessTokenRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.GenerateAwsAccessTokenCallback} callback Node-style callback called with the error, if any, and GenerateAwsAccessTokenResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.generateAwsAccessToken = function generateAwsAccessToken(request, callback) { + return this.rpcCall(generateAwsAccessToken, $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest, $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse, request, callback); + }, "name", { value: "GenerateAwsAccessToken" }); + + /** + * Calls GenerateAwsAccessToken. + * @function generateAwsAccessToken + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest} request GenerateAwsAccessTokenRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|createAwsNodePool}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef CreateAwsNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAwsNodePool. + * @function createAwsNodePool + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest} request CreateAwsNodePoolRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.createAwsNodePool = function createAwsNodePool(request, callback) { + return this.rpcCall(createAwsNodePool, $root.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAwsNodePool" }); + + /** + * Calls CreateAwsNodePool. + * @function createAwsNodePool + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest} request CreateAwsNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|updateAwsNodePool}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef UpdateAwsNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAwsNodePool. + * @function updateAwsNodePool + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest} request UpdateAwsNodePoolRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.updateAwsNodePool = function updateAwsNodePool(request, callback) { + return this.rpcCall(updateAwsNodePool, $root.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAwsNodePool" }); + + /** + * Calls UpdateAwsNodePool. + * @function updateAwsNodePool + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest} request UpdateAwsNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|getAwsNodePool}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef GetAwsNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.AwsNodePool} [response] AwsNodePool + */ + + /** + * Calls GetAwsNodePool. + * @function getAwsNodePool + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest} request GetAwsNodePoolRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.GetAwsNodePoolCallback} callback Node-style callback called with the error, if any, and AwsNodePool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.getAwsNodePool = function getAwsNodePool(request, callback) { + return this.rpcCall(getAwsNodePool, $root.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest, $root.google.cloud.gkemulticloud.v1.AwsNodePool, request, callback); + }, "name", { value: "GetAwsNodePool" }); + + /** + * Calls GetAwsNodePool. + * @function getAwsNodePool + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest} request GetAwsNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|listAwsNodePools}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef ListAwsNodePoolsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} [response] ListAwsNodePoolsResponse + */ + + /** + * Calls ListAwsNodePools. + * @function listAwsNodePools + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest} request ListAwsNodePoolsRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePoolsCallback} callback Node-style callback called with the error, if any, and ListAwsNodePoolsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.listAwsNodePools = function listAwsNodePools(request, callback) { + return this.rpcCall(listAwsNodePools, $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest, $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse, request, callback); + }, "name", { value: "ListAwsNodePools" }); + + /** + * Calls ListAwsNodePools. + * @function listAwsNodePools + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest} request ListAwsNodePoolsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|deleteAwsNodePool}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef DeleteAwsNodePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAwsNodePool. + * @function deleteAwsNodePool + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest} request DeleteAwsNodePoolRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsNodePoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.deleteAwsNodePool = function deleteAwsNodePool(request, callback) { + return this.rpcCall(deleteAwsNodePool, $root.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAwsNodePool" }); + + /** + * Calls DeleteAwsNodePool. + * @function deleteAwsNodePool + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest} request DeleteAwsNodePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkemulticloud.v1.AwsClusters|getAwsServerConfig}. + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @typedef GetAwsServerConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkemulticloud.v1.AwsServerConfig} [response] AwsServerConfig + */ + + /** + * Calls GetAwsServerConfig. + * @function getAwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest} request GetAwsServerConfigRequest message or plain object + * @param {google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfigCallback} callback Node-style callback called with the error, if any, and AwsServerConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AwsClusters.prototype.getAwsServerConfig = function getAwsServerConfig(request, callback) { + return this.rpcCall(getAwsServerConfig, $root.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest, $root.google.cloud.gkemulticloud.v1.AwsServerConfig, request, callback); + }, "name", { value: "GetAwsServerConfig" }); + + /** + * Calls GetAwsServerConfig. + * @function getAwsServerConfig + * @memberof google.cloud.gkemulticloud.v1.AwsClusters + * @instance + * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest} request GetAwsServerConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AwsClusters; + })(); + + v1.CreateAwsClusterRequest = (function() { + + /** + * Properties of a CreateAwsClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface ICreateAwsClusterRequest + * @property {string|null} [parent] CreateAwsClusterRequest parent + * @property {google.cloud.gkemulticloud.v1.IAwsCluster|null} [awsCluster] CreateAwsClusterRequest awsCluster + * @property {string|null} [awsClusterId] CreateAwsClusterRequest awsClusterId + * @property {boolean|null} [validateOnly] CreateAwsClusterRequest validateOnly + */ + + /** + * Constructs a new CreateAwsClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a CreateAwsClusterRequest. + * @implements ICreateAwsClusterRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest=} [properties] Properties to set + */ + function CreateAwsClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAwsClusterRequest parent. + * @member {string} parent + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @instance + */ + CreateAwsClusterRequest.prototype.parent = ""; + + /** + * CreateAwsClusterRequest awsCluster. + * @member {google.cloud.gkemulticloud.v1.IAwsCluster|null|undefined} awsCluster + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @instance + */ + CreateAwsClusterRequest.prototype.awsCluster = null; + + /** + * CreateAwsClusterRequest awsClusterId. + * @member {string} awsClusterId + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @instance + */ + CreateAwsClusterRequest.prototype.awsClusterId = ""; + + /** + * CreateAwsClusterRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @instance + */ + CreateAwsClusterRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAwsClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} CreateAwsClusterRequest instance + */ + CreateAwsClusterRequest.create = function create(properties) { + return new CreateAwsClusterRequest(properties); + }; + + /** + * Encodes the specified CreateAwsClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest} message CreateAwsClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAwsClusterRequest.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.awsCluster != null && Object.hasOwnProperty.call(message, "awsCluster")) + $root.google.cloud.gkemulticloud.v1.AwsCluster.encode(message.awsCluster, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.awsClusterId != null && Object.hasOwnProperty.call(message, "awsClusterId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.awsClusterId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateAwsClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.ICreateAwsClusterRequest} message CreateAwsClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAwsClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAwsClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} CreateAwsClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAwsClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.decode(reader, reader.uint32()); + break; + } + case 3: { + message.awsClusterId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAwsClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} CreateAwsClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAwsClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAwsClusterRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAwsClusterRequest.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.awsCluster != null && message.hasOwnProperty("awsCluster")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsCluster.verify(message.awsCluster); + if (error) + return "awsCluster." + error; + } + if (message.awsClusterId != null && message.hasOwnProperty("awsClusterId")) + if (!$util.isString(message.awsClusterId)) + return "awsClusterId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateAwsClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} CreateAwsClusterRequest + */ + CreateAwsClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.CreateAwsClusterRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.awsCluster != null) { + if (typeof object.awsCluster !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.CreateAwsClusterRequest.awsCluster: object expected"); + message.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.fromObject(object.awsCluster); + } + if (object.awsClusterId != null) + message.awsClusterId = String(object.awsClusterId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateAwsClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.CreateAwsClusterRequest} message CreateAwsClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAwsClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.awsCluster = null; + object.awsClusterId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) + object.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.toObject(message.awsCluster, options); + if (message.awsClusterId != null && message.hasOwnProperty("awsClusterId")) + object.awsClusterId = message.awsClusterId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateAwsClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAwsClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAwsClusterRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.CreateAwsClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAwsClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.CreateAwsClusterRequest"; + }; + + return CreateAwsClusterRequest; + })(); + + v1.UpdateAwsClusterRequest = (function() { + + /** + * Properties of an UpdateAwsClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IUpdateAwsClusterRequest + * @property {google.cloud.gkemulticloud.v1.IAwsCluster|null} [awsCluster] UpdateAwsClusterRequest awsCluster + * @property {boolean|null} [validateOnly] UpdateAwsClusterRequest validateOnly + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAwsClusterRequest updateMask + */ + + /** + * Constructs a new UpdateAwsClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an UpdateAwsClusterRequest. + * @implements IUpdateAwsClusterRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest=} [properties] Properties to set + */ + function UpdateAwsClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAwsClusterRequest awsCluster. + * @member {google.cloud.gkemulticloud.v1.IAwsCluster|null|undefined} awsCluster + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @instance + */ + UpdateAwsClusterRequest.prototype.awsCluster = null; + + /** + * UpdateAwsClusterRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @instance + */ + UpdateAwsClusterRequest.prototype.validateOnly = false; + + /** + * UpdateAwsClusterRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @instance + */ + UpdateAwsClusterRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateAwsClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} UpdateAwsClusterRequest instance + */ + UpdateAwsClusterRequest.create = function create(properties) { + return new UpdateAwsClusterRequest(properties); + }; + + /** + * Encodes the specified UpdateAwsClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest} message UpdateAwsClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAwsClusterRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.awsCluster != null && Object.hasOwnProperty.call(message, "awsCluster")) + $root.google.cloud.gkemulticloud.v1.AwsCluster.encode(message.awsCluster, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateAwsClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsClusterRequest} message UpdateAwsClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAwsClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAwsClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} UpdateAwsClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAwsClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.decode(reader, reader.uint32()); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAwsClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} UpdateAwsClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAwsClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAwsClusterRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAwsClusterRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsCluster.verify(message.awsCluster); + if (error) + return "awsCluster." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateAwsClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} UpdateAwsClusterRequest + */ + UpdateAwsClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest(); + if (object.awsCluster != null) { + if (typeof object.awsCluster !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.awsCluster: object expected"); + message.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.fromObject(object.awsCluster); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAwsClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest} message UpdateAwsClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAwsClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.awsCluster = null; + object.validateOnly = false; + object.updateMask = null; + } + if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) + object.awsCluster = $root.google.cloud.gkemulticloud.v1.AwsCluster.toObject(message.awsCluster, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateAwsClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAwsClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAwsClusterRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAwsClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.UpdateAwsClusterRequest"; + }; + + return UpdateAwsClusterRequest; + })(); + + v1.GetAwsClusterRequest = (function() { + + /** + * Properties of a GetAwsClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IGetAwsClusterRequest + * @property {string|null} [name] GetAwsClusterRequest name + */ + + /** + * Constructs a new GetAwsClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a GetAwsClusterRequest. + * @implements IGetAwsClusterRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest=} [properties] Properties to set + */ + function GetAwsClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAwsClusterRequest name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @instance + */ + GetAwsClusterRequest.prototype.name = ""; + + /** + * Creates a new GetAwsClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} GetAwsClusterRequest instance + */ + GetAwsClusterRequest.create = function create(properties) { + return new GetAwsClusterRequest(properties); + }; + + /** + * Encodes the specified GetAwsClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest} message GetAwsClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAwsClusterRequest.encode = function encode(message, writer) { + 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 GetAwsClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsClusterRequest} message GetAwsClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAwsClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAwsClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} GetAwsClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAwsClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GetAwsClusterRequest(); + 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 GetAwsClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} GetAwsClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAwsClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAwsClusterRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAwsClusterRequest.verify = function verify(message) { + if (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 GetAwsClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} GetAwsClusterRequest + */ + GetAwsClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GetAwsClusterRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.GetAwsClusterRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAwsClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.GetAwsClusterRequest} message GetAwsClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAwsClusterRequest.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 GetAwsClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @instance + * @returns {Object.} JSON object + */ + GetAwsClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAwsClusterRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.GetAwsClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAwsClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GetAwsClusterRequest"; + }; + + return GetAwsClusterRequest; + })(); + + v1.ListAwsClustersRequest = (function() { + + /** + * Properties of a ListAwsClustersRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IListAwsClustersRequest + * @property {string|null} [parent] ListAwsClustersRequest parent + * @property {number|null} [pageSize] ListAwsClustersRequest pageSize + * @property {string|null} [pageToken] ListAwsClustersRequest pageToken + */ + + /** + * Constructs a new ListAwsClustersRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a ListAwsClustersRequest. + * @implements IListAwsClustersRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest=} [properties] Properties to set + */ + function ListAwsClustersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAwsClustersRequest parent. + * @member {string} parent + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @instance + */ + ListAwsClustersRequest.prototype.parent = ""; + + /** + * ListAwsClustersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @instance + */ + ListAwsClustersRequest.prototype.pageSize = 0; + + /** + * ListAwsClustersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @instance + */ + ListAwsClustersRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAwsClustersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} ListAwsClustersRequest instance + */ + ListAwsClustersRequest.create = function create(properties) { + return new ListAwsClustersRequest(properties); + }; + + /** + * Encodes the specified ListAwsClustersRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsClustersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest} message ListAwsClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAwsClustersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAwsClustersRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsClustersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersRequest} message ListAwsClustersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAwsClustersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAwsClustersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} ListAwsClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAwsClustersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAwsClustersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAwsClustersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} ListAwsClustersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAwsClustersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAwsClustersRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAwsClustersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAwsClustersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} ListAwsClustersRequest + */ + ListAwsClustersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAwsClustersRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.ListAwsClustersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListAwsClustersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {google.cloud.gkemulticloud.v1.ListAwsClustersRequest} message ListAwsClustersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAwsClustersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListAwsClustersRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @instance + * @returns {Object.} JSON object + */ + ListAwsClustersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAwsClustersRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAwsClustersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAwsClustersRequest"; + }; + + return ListAwsClustersRequest; + })(); + + v1.ListAwsClustersResponse = (function() { + + /** + * Properties of a ListAwsClustersResponse. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IListAwsClustersResponse + * @property {Array.|null} [awsClusters] ListAwsClustersResponse awsClusters + * @property {string|null} [nextPageToken] ListAwsClustersResponse nextPageToken + */ + + /** + * Constructs a new ListAwsClustersResponse. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a ListAwsClustersResponse. + * @implements IListAwsClustersResponse + * @constructor + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersResponse=} [properties] Properties to set + */ + function ListAwsClustersResponse(properties) { + this.awsClusters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAwsClustersResponse awsClusters. + * @member {Array.} awsClusters + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @instance + */ + ListAwsClustersResponse.prototype.awsClusters = $util.emptyArray; + + /** + * ListAwsClustersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @instance + */ + ListAwsClustersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAwsClustersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersResponse=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} ListAwsClustersResponse instance + */ + ListAwsClustersResponse.create = function create(properties) { + return new ListAwsClustersResponse(properties); + }; + + /** + * Encodes the specified ListAwsClustersResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersResponse} message ListAwsClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAwsClustersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.awsClusters != null && message.awsClusters.length) + for (var i = 0; i < message.awsClusters.length; ++i) + $root.google.cloud.gkemulticloud.v1.AwsCluster.encode(message.awsClusters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListAwsClustersResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsClustersResponse} message ListAwsClustersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAwsClustersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAwsClustersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} ListAwsClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAwsClustersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAwsClustersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.awsClusters && message.awsClusters.length)) + message.awsClusters = []; + message.awsClusters.push($root.google.cloud.gkemulticloud.v1.AwsCluster.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAwsClustersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} ListAwsClustersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAwsClustersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAwsClustersResponse message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAwsClustersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.awsClusters != null && message.hasOwnProperty("awsClusters")) { + if (!Array.isArray(message.awsClusters)) + return "awsClusters: array expected"; + for (var i = 0; i < message.awsClusters.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AwsCluster.verify(message.awsClusters[i]); + if (error) + return "awsClusters." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAwsClustersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} ListAwsClustersResponse + */ + ListAwsClustersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAwsClustersResponse) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.ListAwsClustersResponse(); + if (object.awsClusters) { + if (!Array.isArray(object.awsClusters)) + throw TypeError(".google.cloud.gkemulticloud.v1.ListAwsClustersResponse.awsClusters: array expected"); + message.awsClusters = []; + for (var i = 0; i < object.awsClusters.length; ++i) { + if (typeof object.awsClusters[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.ListAwsClustersResponse.awsClusters: object expected"); + message.awsClusters[i] = $root.google.cloud.gkemulticloud.v1.AwsCluster.fromObject(object.awsClusters[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAwsClustersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {google.cloud.gkemulticloud.v1.ListAwsClustersResponse} message ListAwsClustersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAwsClustersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.awsClusters = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.awsClusters && message.awsClusters.length) { + object.awsClusters = []; + for (var j = 0; j < message.awsClusters.length; ++j) + object.awsClusters[j] = $root.google.cloud.gkemulticloud.v1.AwsCluster.toObject(message.awsClusters[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAwsClustersResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @instance + * @returns {Object.} JSON object + */ + ListAwsClustersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAwsClustersResponse + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.ListAwsClustersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAwsClustersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAwsClustersResponse"; + }; + + return ListAwsClustersResponse; + })(); + + v1.DeleteAwsClusterRequest = (function() { + + /** + * Properties of a DeleteAwsClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IDeleteAwsClusterRequest + * @property {string|null} [name] DeleteAwsClusterRequest name + * @property {boolean|null} [validateOnly] DeleteAwsClusterRequest validateOnly + * @property {boolean|null} [allowMissing] DeleteAwsClusterRequest allowMissing + * @property {string|null} [etag] DeleteAwsClusterRequest etag + */ + + /** + * Constructs a new DeleteAwsClusterRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a DeleteAwsClusterRequest. + * @implements IDeleteAwsClusterRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest=} [properties] Properties to set + */ + function DeleteAwsClusterRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAwsClusterRequest name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @instance + */ + DeleteAwsClusterRequest.prototype.name = ""; + + /** + * DeleteAwsClusterRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @instance + */ + DeleteAwsClusterRequest.prototype.validateOnly = false; + + /** + * DeleteAwsClusterRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @instance + */ + DeleteAwsClusterRequest.prototype.allowMissing = false; + + /** + * DeleteAwsClusterRequest etag. + * @member {string} etag + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @instance + */ + DeleteAwsClusterRequest.prototype.etag = ""; + + /** + * Creates a new DeleteAwsClusterRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} DeleteAwsClusterRequest instance + */ + DeleteAwsClusterRequest.create = function create(properties) { + return new DeleteAwsClusterRequest(properties); + }; + + /** + * Encodes the specified DeleteAwsClusterRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest} message DeleteAwsClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAwsClusterRequest.encode = function encode(message, writer) { + 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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteAwsClusterRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsClusterRequest} message DeleteAwsClusterRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAwsClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAwsClusterRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} DeleteAwsClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAwsClusterRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAwsClusterRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} DeleteAwsClusterRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAwsClusterRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAwsClusterRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAwsClusterRequest.verify = function verify(message) { + if (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.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteAwsClusterRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} DeleteAwsClusterRequest + */ + DeleteAwsClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteAwsClusterRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest} message DeleteAwsClusterRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAwsClusterRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + object.allowMissing = false; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteAwsClusterRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAwsClusterRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAwsClusterRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAwsClusterRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.DeleteAwsClusterRequest"; + }; + + return DeleteAwsClusterRequest; + })(); + + v1.CreateAwsNodePoolRequest = (function() { + + /** + * Properties of a CreateAwsNodePoolRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface ICreateAwsNodePoolRequest + * @property {string|null} [parent] CreateAwsNodePoolRequest parent + * @property {google.cloud.gkemulticloud.v1.IAwsNodePool|null} [awsNodePool] CreateAwsNodePoolRequest awsNodePool + * @property {string|null} [awsNodePoolId] CreateAwsNodePoolRequest awsNodePoolId + * @property {boolean|null} [validateOnly] CreateAwsNodePoolRequest validateOnly + */ + + /** + * Constructs a new CreateAwsNodePoolRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a CreateAwsNodePoolRequest. + * @implements ICreateAwsNodePoolRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest=} [properties] Properties to set + */ + function CreateAwsNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAwsNodePoolRequest parent. + * @member {string} parent + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @instance + */ + CreateAwsNodePoolRequest.prototype.parent = ""; + + /** + * CreateAwsNodePoolRequest awsNodePool. + * @member {google.cloud.gkemulticloud.v1.IAwsNodePool|null|undefined} awsNodePool + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @instance + */ + CreateAwsNodePoolRequest.prototype.awsNodePool = null; + + /** + * CreateAwsNodePoolRequest awsNodePoolId. + * @member {string} awsNodePoolId + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @instance + */ + CreateAwsNodePoolRequest.prototype.awsNodePoolId = ""; + + /** + * CreateAwsNodePoolRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @instance + */ + CreateAwsNodePoolRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAwsNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} CreateAwsNodePoolRequest instance + */ + CreateAwsNodePoolRequest.create = function create(properties) { + return new CreateAwsNodePoolRequest(properties); + }; + + /** + * Encodes the specified CreateAwsNodePoolRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest} message CreateAwsNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAwsNodePoolRequest.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.awsNodePool != null && Object.hasOwnProperty.call(message, "awsNodePool")) + $root.google.cloud.gkemulticloud.v1.AwsNodePool.encode(message.awsNodePool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.awsNodePoolId != null && Object.hasOwnProperty.call(message, "awsNodePoolId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.awsNodePoolId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateAwsNodePoolRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.ICreateAwsNodePoolRequest} message CreateAwsNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAwsNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAwsNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} CreateAwsNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAwsNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.decode(reader, reader.uint32()); + break; + } + case 3: { + message.awsNodePoolId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAwsNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} CreateAwsNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAwsNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAwsNodePoolRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAwsNodePoolRequest.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.awsNodePool != null && message.hasOwnProperty("awsNodePool")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsNodePool.verify(message.awsNodePool); + if (error) + return "awsNodePool." + error; + } + if (message.awsNodePoolId != null && message.hasOwnProperty("awsNodePoolId")) + if (!$util.isString(message.awsNodePoolId)) + return "awsNodePoolId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateAwsNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} CreateAwsNodePoolRequest + */ + CreateAwsNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.awsNodePool != null) { + if (typeof object.awsNodePool !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest.awsNodePool: object expected"); + message.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.fromObject(object.awsNodePool); + } + if (object.awsNodePoolId != null) + message.awsNodePoolId = String(object.awsNodePoolId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateAwsNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest} message CreateAwsNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAwsNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.awsNodePool = null; + object.awsNodePoolId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.awsNodePool != null && message.hasOwnProperty("awsNodePool")) + object.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.toObject(message.awsNodePool, options); + if (message.awsNodePoolId != null && message.hasOwnProperty("awsNodePoolId")) + object.awsNodePoolId = message.awsNodePoolId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateAwsNodePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAwsNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAwsNodePoolRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAwsNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.CreateAwsNodePoolRequest"; + }; + + return CreateAwsNodePoolRequest; + })(); + + v1.UpdateAwsNodePoolRequest = (function() { + + /** + * Properties of an UpdateAwsNodePoolRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IUpdateAwsNodePoolRequest + * @property {google.cloud.gkemulticloud.v1.IAwsNodePool|null} [awsNodePool] UpdateAwsNodePoolRequest awsNodePool + * @property {boolean|null} [validateOnly] UpdateAwsNodePoolRequest validateOnly + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAwsNodePoolRequest updateMask + */ + + /** + * Constructs a new UpdateAwsNodePoolRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an UpdateAwsNodePoolRequest. + * @implements IUpdateAwsNodePoolRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest=} [properties] Properties to set + */ + function UpdateAwsNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAwsNodePoolRequest awsNodePool. + * @member {google.cloud.gkemulticloud.v1.IAwsNodePool|null|undefined} awsNodePool + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @instance + */ + UpdateAwsNodePoolRequest.prototype.awsNodePool = null; + + /** + * UpdateAwsNodePoolRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @instance + */ + UpdateAwsNodePoolRequest.prototype.validateOnly = false; + + /** + * UpdateAwsNodePoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @instance + */ + UpdateAwsNodePoolRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateAwsNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} UpdateAwsNodePoolRequest instance + */ + UpdateAwsNodePoolRequest.create = function create(properties) { + return new UpdateAwsNodePoolRequest(properties); + }; + + /** + * Encodes the specified UpdateAwsNodePoolRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest} message UpdateAwsNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAwsNodePoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.awsNodePool != null && Object.hasOwnProperty.call(message, "awsNodePool")) + $root.google.cloud.gkemulticloud.v1.AwsNodePool.encode(message.awsNodePool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateAwsNodePoolRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IUpdateAwsNodePoolRequest} message UpdateAwsNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAwsNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAwsNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} UpdateAwsNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAwsNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.decode(reader, reader.uint32()); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateAwsNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} UpdateAwsNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAwsNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAwsNodePoolRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAwsNodePoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.awsNodePool != null && message.hasOwnProperty("awsNodePool")) { + var error = $root.google.cloud.gkemulticloud.v1.AwsNodePool.verify(message.awsNodePool); + if (error) + return "awsNodePool." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateAwsNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} UpdateAwsNodePoolRequest + */ + UpdateAwsNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest(); + if (object.awsNodePool != null) { + if (typeof object.awsNodePool !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.awsNodePool: object expected"); + message.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.fromObject(object.awsNodePool); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAwsNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest} message UpdateAwsNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAwsNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.awsNodePool = null; + object.validateOnly = false; + object.updateMask = null; + } + if (message.awsNodePool != null && message.hasOwnProperty("awsNodePool")) + object.awsNodePool = $root.google.cloud.gkemulticloud.v1.AwsNodePool.toObject(message.awsNodePool, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateAwsNodePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAwsNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAwsNodePoolRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAwsNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.UpdateAwsNodePoolRequest"; + }; + + return UpdateAwsNodePoolRequest; + })(); + + v1.GetAwsNodePoolRequest = (function() { + + /** + * Properties of a GetAwsNodePoolRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IGetAwsNodePoolRequest + * @property {string|null} [name] GetAwsNodePoolRequest name + */ + + /** + * Constructs a new GetAwsNodePoolRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a GetAwsNodePoolRequest. + * @implements IGetAwsNodePoolRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest=} [properties] Properties to set + */ + function GetAwsNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAwsNodePoolRequest name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @instance + */ + GetAwsNodePoolRequest.prototype.name = ""; + + /** + * Creates a new GetAwsNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} GetAwsNodePoolRequest instance + */ + GetAwsNodePoolRequest.create = function create(properties) { + return new GetAwsNodePoolRequest(properties); + }; + + /** + * Encodes the specified GetAwsNodePoolRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest} message GetAwsNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAwsNodePoolRequest.encode = function encode(message, writer) { + 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 GetAwsNodePoolRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsNodePoolRequest} message GetAwsNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAwsNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAwsNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} GetAwsNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAwsNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest(); + 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 GetAwsNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} GetAwsNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAwsNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAwsNodePoolRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAwsNodePoolRequest.verify = function verify(message) { + if (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 GetAwsNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} GetAwsNodePoolRequest + */ + GetAwsNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAwsNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest} message GetAwsNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAwsNodePoolRequest.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 GetAwsNodePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + GetAwsNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAwsNodePoolRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAwsNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GetAwsNodePoolRequest"; + }; + + return GetAwsNodePoolRequest; + })(); + + v1.ListAwsNodePoolsRequest = (function() { + + /** + * Properties of a ListAwsNodePoolsRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IListAwsNodePoolsRequest + * @property {string|null} [parent] ListAwsNodePoolsRequest parent + * @property {number|null} [pageSize] ListAwsNodePoolsRequest pageSize + * @property {string|null} [pageToken] ListAwsNodePoolsRequest pageToken + */ + + /** + * Constructs a new ListAwsNodePoolsRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a ListAwsNodePoolsRequest. + * @implements IListAwsNodePoolsRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest=} [properties] Properties to set + */ + function ListAwsNodePoolsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAwsNodePoolsRequest parent. + * @member {string} parent + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @instance + */ + ListAwsNodePoolsRequest.prototype.parent = ""; + + /** + * ListAwsNodePoolsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @instance + */ + ListAwsNodePoolsRequest.prototype.pageSize = 0; + + /** + * ListAwsNodePoolsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @instance + */ + ListAwsNodePoolsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAwsNodePoolsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} ListAwsNodePoolsRequest instance + */ + ListAwsNodePoolsRequest.create = function create(properties) { + return new ListAwsNodePoolsRequest(properties); + }; + + /** + * Encodes the specified ListAwsNodePoolsRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest} message ListAwsNodePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAwsNodePoolsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAwsNodePoolsRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsRequest} message ListAwsNodePoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAwsNodePoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAwsNodePoolsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} ListAwsNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAwsNodePoolsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAwsNodePoolsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} ListAwsNodePoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAwsNodePoolsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAwsNodePoolsRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAwsNodePoolsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAwsNodePoolsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} ListAwsNodePoolsRequest + */ + ListAwsNodePoolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListAwsNodePoolsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest} message ListAwsNodePoolsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAwsNodePoolsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListAwsNodePoolsRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAwsNodePoolsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAwsNodePoolsRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAwsNodePoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAwsNodePoolsRequest"; + }; + + return ListAwsNodePoolsRequest; + })(); + + v1.ListAwsNodePoolsResponse = (function() { + + /** + * Properties of a ListAwsNodePoolsResponse. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IListAwsNodePoolsResponse + * @property {Array.|null} [awsNodePools] ListAwsNodePoolsResponse awsNodePools + * @property {string|null} [nextPageToken] ListAwsNodePoolsResponse nextPageToken + */ + + /** + * Constructs a new ListAwsNodePoolsResponse. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a ListAwsNodePoolsResponse. + * @implements IListAwsNodePoolsResponse + * @constructor + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse=} [properties] Properties to set + */ + function ListAwsNodePoolsResponse(properties) { + this.awsNodePools = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAwsNodePoolsResponse awsNodePools. + * @member {Array.} awsNodePools + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @instance + */ + ListAwsNodePoolsResponse.prototype.awsNodePools = $util.emptyArray; + + /** + * ListAwsNodePoolsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @instance + */ + ListAwsNodePoolsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAwsNodePoolsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} ListAwsNodePoolsResponse instance + */ + ListAwsNodePoolsResponse.create = function create(properties) { + return new ListAwsNodePoolsResponse(properties); + }; + + /** + * Encodes the specified ListAwsNodePoolsResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse} message ListAwsNodePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAwsNodePoolsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.awsNodePools != null && message.awsNodePools.length) + for (var i = 0; i < message.awsNodePools.length; ++i) + $root.google.cloud.gkemulticloud.v1.AwsNodePool.encode(message.awsNodePools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListAwsNodePoolsResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IListAwsNodePoolsResponse} message ListAwsNodePoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAwsNodePoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAwsNodePoolsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} ListAwsNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAwsNodePoolsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.awsNodePools && message.awsNodePools.length)) + message.awsNodePools = []; + message.awsNodePools.push($root.google.cloud.gkemulticloud.v1.AwsNodePool.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAwsNodePoolsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} ListAwsNodePoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAwsNodePoolsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAwsNodePoolsResponse message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAwsNodePoolsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.awsNodePools != null && message.hasOwnProperty("awsNodePools")) { + if (!Array.isArray(message.awsNodePools)) + return "awsNodePools: array expected"; + for (var i = 0; i < message.awsNodePools.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AwsNodePool.verify(message.awsNodePools[i]); + if (error) + return "awsNodePools." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAwsNodePoolsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} ListAwsNodePoolsResponse + */ + ListAwsNodePoolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse(); + if (object.awsNodePools) { + if (!Array.isArray(object.awsNodePools)) + throw TypeError(".google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.awsNodePools: array expected"); + message.awsNodePools = []; + for (var i = 0; i < object.awsNodePools.length; ++i) { + if (typeof object.awsNodePools[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.awsNodePools: object expected"); + message.awsNodePools[i] = $root.google.cloud.gkemulticloud.v1.AwsNodePool.fromObject(object.awsNodePools[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAwsNodePoolsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse} message ListAwsNodePoolsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAwsNodePoolsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.awsNodePools = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.awsNodePools && message.awsNodePools.length) { + object.awsNodePools = []; + for (var j = 0; j < message.awsNodePools.length; ++j) + object.awsNodePools[j] = $root.google.cloud.gkemulticloud.v1.AwsNodePool.toObject(message.awsNodePools[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAwsNodePoolsResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAwsNodePoolsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAwsNodePoolsResponse + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAwsNodePoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse"; + }; + + return ListAwsNodePoolsResponse; + })(); + + v1.DeleteAwsNodePoolRequest = (function() { + + /** + * Properties of a DeleteAwsNodePoolRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IDeleteAwsNodePoolRequest + * @property {string|null} [name] DeleteAwsNodePoolRequest name + * @property {boolean|null} [validateOnly] DeleteAwsNodePoolRequest validateOnly + * @property {boolean|null} [allowMissing] DeleteAwsNodePoolRequest allowMissing + * @property {string|null} [etag] DeleteAwsNodePoolRequest etag + */ + + /** + * Constructs a new DeleteAwsNodePoolRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a DeleteAwsNodePoolRequest. + * @implements IDeleteAwsNodePoolRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest=} [properties] Properties to set + */ + function DeleteAwsNodePoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAwsNodePoolRequest name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @instance + */ + DeleteAwsNodePoolRequest.prototype.name = ""; + + /** + * DeleteAwsNodePoolRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @instance + */ + DeleteAwsNodePoolRequest.prototype.validateOnly = false; + + /** + * DeleteAwsNodePoolRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @instance + */ + DeleteAwsNodePoolRequest.prototype.allowMissing = false; + + /** + * DeleteAwsNodePoolRequest etag. + * @member {string} etag + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @instance + */ + DeleteAwsNodePoolRequest.prototype.etag = ""; + + /** + * Creates a new DeleteAwsNodePoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} DeleteAwsNodePoolRequest instance + */ + DeleteAwsNodePoolRequest.create = function create(properties) { + return new DeleteAwsNodePoolRequest(properties); + }; + + /** + * Encodes the specified DeleteAwsNodePoolRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest} message DeleteAwsNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAwsNodePoolRequest.encode = function encode(message, writer) { + 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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DeleteAwsNodePoolRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IDeleteAwsNodePoolRequest} message DeleteAwsNodePoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAwsNodePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAwsNodePoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} DeleteAwsNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAwsNodePoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAwsNodePoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} DeleteAwsNodePoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAwsNodePoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAwsNodePoolRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAwsNodePoolRequest.verify = function verify(message) { + if (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.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a DeleteAwsNodePoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} DeleteAwsNodePoolRequest + */ + DeleteAwsNodePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a DeleteAwsNodePoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest} message DeleteAwsNodePoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAwsNodePoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + object.allowMissing = false; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this DeleteAwsNodePoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAwsNodePoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAwsNodePoolRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAwsNodePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.DeleteAwsNodePoolRequest"; + }; + + return DeleteAwsNodePoolRequest; + })(); + + v1.GetAwsServerConfigRequest = (function() { + + /** + * Properties of a GetAwsServerConfigRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IGetAwsServerConfigRequest + * @property {string|null} [name] GetAwsServerConfigRequest name + */ + + /** + * Constructs a new GetAwsServerConfigRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a GetAwsServerConfigRequest. + * @implements IGetAwsServerConfigRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest=} [properties] Properties to set + */ + function GetAwsServerConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAwsServerConfigRequest name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @instance + */ + GetAwsServerConfigRequest.prototype.name = ""; + + /** + * Creates a new GetAwsServerConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} GetAwsServerConfigRequest instance + */ + GetAwsServerConfigRequest.create = function create(properties) { + return new GetAwsServerConfigRequest(properties); + }; + + /** + * Encodes the specified GetAwsServerConfigRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest} message GetAwsServerConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAwsServerConfigRequest.encode = function encode(message, writer) { + 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 GetAwsServerConfigRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGetAwsServerConfigRequest} message GetAwsServerConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAwsServerConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAwsServerConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} GetAwsServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAwsServerConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest(); + 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 GetAwsServerConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} GetAwsServerConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAwsServerConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAwsServerConfigRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAwsServerConfigRequest.verify = function verify(message) { + if (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 GetAwsServerConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} GetAwsServerConfigRequest + */ + GetAwsServerConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAwsServerConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest} message GetAwsServerConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAwsServerConfigRequest.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 GetAwsServerConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetAwsServerConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAwsServerConfigRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAwsServerConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GetAwsServerConfigRequest"; + }; + + return GetAwsServerConfigRequest; + })(); + + v1.GenerateAwsAccessTokenRequest = (function() { + + /** + * Properties of a GenerateAwsAccessTokenRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IGenerateAwsAccessTokenRequest + * @property {string|null} [awsCluster] GenerateAwsAccessTokenRequest awsCluster + */ + + /** + * Constructs a new GenerateAwsAccessTokenRequest. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a GenerateAwsAccessTokenRequest. + * @implements IGenerateAwsAccessTokenRequest + * @constructor + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest=} [properties] Properties to set + */ + function GenerateAwsAccessTokenRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateAwsAccessTokenRequest awsCluster. + * @member {string} awsCluster + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @instance + */ + GenerateAwsAccessTokenRequest.prototype.awsCluster = ""; + + /** + * Creates a new GenerateAwsAccessTokenRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} GenerateAwsAccessTokenRequest instance + */ + GenerateAwsAccessTokenRequest.create = function create(properties) { + return new GenerateAwsAccessTokenRequest(properties); + }; + + /** + * Encodes the specified GenerateAwsAccessTokenRequest message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest} message GenerateAwsAccessTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateAwsAccessTokenRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.awsCluster != null && Object.hasOwnProperty.call(message, "awsCluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.awsCluster); + return writer; + }; + + /** + * Encodes the specified GenerateAwsAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenRequest} message GenerateAwsAccessTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateAwsAccessTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateAwsAccessTokenRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} GenerateAwsAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateAwsAccessTokenRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.awsCluster = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateAwsAccessTokenRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} GenerateAwsAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateAwsAccessTokenRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateAwsAccessTokenRequest message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateAwsAccessTokenRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) + if (!$util.isString(message.awsCluster)) + return "awsCluster: string expected"; + return null; + }; + + /** + * Creates a GenerateAwsAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} GenerateAwsAccessTokenRequest + */ + GenerateAwsAccessTokenRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest(); + if (object.awsCluster != null) + message.awsCluster = String(object.awsCluster); + return message; + }; + + /** + * Creates a plain object from a GenerateAwsAccessTokenRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} message GenerateAwsAccessTokenRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateAwsAccessTokenRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.awsCluster = ""; + if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) + object.awsCluster = message.awsCluster; + return object; + }; + + /** + * Converts this GenerateAwsAccessTokenRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateAwsAccessTokenRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateAwsAccessTokenRequest + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateAwsAccessTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest"; + }; + + return GenerateAwsAccessTokenRequest; + })(); + + v1.GenerateAwsAccessTokenResponse = (function() { + + /** + * Properties of a GenerateAwsAccessTokenResponse. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IGenerateAwsAccessTokenResponse + * @property {string|null} [accessToken] GenerateAwsAccessTokenResponse accessToken + * @property {google.protobuf.ITimestamp|null} [expirationTime] GenerateAwsAccessTokenResponse expirationTime + */ + + /** + * Constructs a new GenerateAwsAccessTokenResponse. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents a GenerateAwsAccessTokenResponse. + * @implements IGenerateAwsAccessTokenResponse + * @constructor + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse=} [properties] Properties to set + */ + function GenerateAwsAccessTokenResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateAwsAccessTokenResponse accessToken. + * @member {string} accessToken + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @instance + */ + GenerateAwsAccessTokenResponse.prototype.accessToken = ""; + + /** + * GenerateAwsAccessTokenResponse expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @instance + */ + GenerateAwsAccessTokenResponse.prototype.expirationTime = null; + + /** + * Creates a new GenerateAwsAccessTokenResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} GenerateAwsAccessTokenResponse instance + */ + GenerateAwsAccessTokenResponse.create = function create(properties) { + return new GenerateAwsAccessTokenResponse(properties); + }; + + /** + * Encodes the specified GenerateAwsAccessTokenResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse} message GenerateAwsAccessTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateAwsAccessTokenResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accessToken != null && Object.hasOwnProperty.call(message, "accessToken")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accessToken); + if (message.expirationTime != null && Object.hasOwnProperty.call(message, "expirationTime")) + $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateAwsAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse} message GenerateAwsAccessTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateAwsAccessTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateAwsAccessTokenResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} GenerateAwsAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateAwsAccessTokenResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accessToken = reader.string(); + break; + } + case 2: { + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateAwsAccessTokenResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} GenerateAwsAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateAwsAccessTokenResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateAwsAccessTokenResponse message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateAwsAccessTokenResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + if (!$util.isString(message.accessToken)) + return "accessToken: string expected"; + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); + if (error) + return "expirationTime." + error; + } + return null; + }; + + /** + * Creates a GenerateAwsAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} GenerateAwsAccessTokenResponse + */ + GenerateAwsAccessTokenResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse(); + if (object.accessToken != null) + message.accessToken = String(object.accessToken); + if (object.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); + } + return message; + }; + + /** + * Creates a plain object from a GenerateAwsAccessTokenResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} message GenerateAwsAccessTokenResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateAwsAccessTokenResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.accessToken = ""; + object.expirationTime = null; + } + if (message.accessToken != null && message.hasOwnProperty("accessToken")) + object.accessToken = message.accessToken; + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); + return object; + }; + + /** + * Converts this GenerateAwsAccessTokenResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateAwsAccessTokenResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateAwsAccessTokenResponse + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateAwsAccessTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse"; + }; + + return GenerateAwsAccessTokenResponse; + })(); + + v1.AzureCluster = (function() { + + /** + * Properties of an AzureCluster. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAzureCluster + * @property {string|null} [name] AzureCluster name + * @property {string|null} [description] AzureCluster description + * @property {string|null} [azureRegion] AzureCluster azureRegion + * @property {string|null} [resourceGroupId] AzureCluster resourceGroupId + * @property {string|null} [azureClient] AzureCluster azureClient + * @property {google.cloud.gkemulticloud.v1.IAzureClusterNetworking|null} [networking] AzureCluster networking + * @property {google.cloud.gkemulticloud.v1.IAzureControlPlane|null} [controlPlane] AzureCluster controlPlane + * @property {google.cloud.gkemulticloud.v1.IAzureAuthorization|null} [authorization] AzureCluster authorization + * @property {google.cloud.gkemulticloud.v1.AzureCluster.State|null} [state] AzureCluster state + * @property {string|null} [endpoint] AzureCluster endpoint + * @property {string|null} [uid] AzureCluster uid + * @property {boolean|null} [reconciling] AzureCluster reconciling + * @property {google.protobuf.ITimestamp|null} [createTime] AzureCluster createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AzureCluster updateTime + * @property {string|null} [etag] AzureCluster etag + * @property {Object.|null} [annotations] AzureCluster annotations + * @property {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] AzureCluster workloadIdentityConfig + * @property {string|null} [clusterCaCertificate] AzureCluster clusterCaCertificate + * @property {google.cloud.gkemulticloud.v1.IFleet|null} [fleet] AzureCluster fleet + * @property {google.cloud.gkemulticloud.v1.IAzureClusterResources|null} [managedResources] AzureCluster managedResources + * @property {google.cloud.gkemulticloud.v1.ILoggingConfig|null} [loggingConfig] AzureCluster loggingConfig + * @property {Array.|null} [errors] AzureCluster errors + * @property {google.cloud.gkemulticloud.v1.IMonitoringConfig|null} [monitoringConfig] AzureCluster monitoringConfig + */ + + /** + * Constructs a new AzureCluster. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AzureCluster. + * @implements IAzureCluster + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAzureCluster=} [properties] Properties to set + */ + function AzureCluster(properties) { + this.annotations = {}; + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AzureCluster name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.name = ""; + + /** + * AzureCluster description. + * @member {string} description + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.description = ""; + + /** + * AzureCluster azureRegion. + * @member {string} azureRegion + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.azureRegion = ""; + + /** + * AzureCluster resourceGroupId. + * @member {string} resourceGroupId + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.resourceGroupId = ""; + + /** + * AzureCluster azureClient. + * @member {string} azureClient + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.azureClient = ""; + + /** + * AzureCluster networking. + * @member {google.cloud.gkemulticloud.v1.IAzureClusterNetworking|null|undefined} networking + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.networking = null; + + /** + * AzureCluster controlPlane. + * @member {google.cloud.gkemulticloud.v1.IAzureControlPlane|null|undefined} controlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.controlPlane = null; + + /** + * AzureCluster authorization. + * @member {google.cloud.gkemulticloud.v1.IAzureAuthorization|null|undefined} authorization + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.authorization = null; + + /** + * AzureCluster state. + * @member {google.cloud.gkemulticloud.v1.AzureCluster.State} state + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.state = 0; + + /** + * AzureCluster endpoint. + * @member {string} endpoint + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.endpoint = ""; + + /** + * AzureCluster uid. + * @member {string} uid + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.uid = ""; + + /** + * AzureCluster reconciling. + * @member {boolean} reconciling + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.reconciling = false; + + /** + * AzureCluster createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.createTime = null; + + /** + * AzureCluster updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.updateTime = null; + + /** + * AzureCluster etag. + * @member {string} etag + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.etag = ""; + + /** + * AzureCluster annotations. + * @member {Object.} annotations + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.annotations = $util.emptyObject; + + /** + * AzureCluster workloadIdentityConfig. + * @member {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null|undefined} workloadIdentityConfig + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.workloadIdentityConfig = null; + + /** + * AzureCluster clusterCaCertificate. + * @member {string} clusterCaCertificate + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.clusterCaCertificate = ""; + + /** + * AzureCluster fleet. + * @member {google.cloud.gkemulticloud.v1.IFleet|null|undefined} fleet + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.fleet = null; + + /** + * AzureCluster managedResources. + * @member {google.cloud.gkemulticloud.v1.IAzureClusterResources|null|undefined} managedResources + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.managedResources = null; + + /** + * AzureCluster loggingConfig. + * @member {google.cloud.gkemulticloud.v1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.loggingConfig = null; + + /** + * AzureCluster errors. + * @member {Array.} errors + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.errors = $util.emptyArray; + + /** + * AzureCluster monitoringConfig. + * @member {google.cloud.gkemulticloud.v1.IMonitoringConfig|null|undefined} monitoringConfig + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @instance + */ + AzureCluster.prototype.monitoringConfig = null; + + /** + * Creates a new AzureCluster instance using the specified properties. + * @function create + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @static + * @param {google.cloud.gkemulticloud.v1.IAzureCluster=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureCluster} AzureCluster instance + */ + AzureCluster.create = function create(properties) { + return new AzureCluster(properties); + }; + + /** + * Encodes the specified AzureCluster message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureCluster.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @static + * @param {google.cloud.gkemulticloud.v1.IAzureCluster} message AzureCluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureCluster.encode = function encode(message, writer) { + 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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.azureRegion != null && Object.hasOwnProperty.call(message, "azureRegion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.azureRegion); + if (message.networking != null && Object.hasOwnProperty.call(message, "networking")) + $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.encode(message.networking, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.controlPlane != null && Object.hasOwnProperty.call(message, "controlPlane")) + $root.google.cloud.gkemulticloud.v1.AzureControlPlane.encode(message.controlPlane, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) + $root.google.cloud.gkemulticloud.v1.AzureAuthorization.encode(message.authorization, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpoint); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.uid); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.reconciling); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.azureClient != null && Object.hasOwnProperty.call(message, "azureClient")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.azureClient); + if (message.resourceGroupId != null && Object.hasOwnProperty.call(message, "resourceGroupId")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.resourceGroupId); + if (message.workloadIdentityConfig != null && Object.hasOwnProperty.call(message, "workloadIdentityConfig")) + $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.clusterCaCertificate != null && Object.hasOwnProperty.call(message, "clusterCaCertificate")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.clusterCaCertificate); + if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) + $root.google.cloud.gkemulticloud.v1.Fleet.encode(message.fleet, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.managedResources != null && Object.hasOwnProperty.call(message, "managedResources")) + $root.google.cloud.gkemulticloud.v1.AzureClusterResources.encode(message.managedResources, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.cloud.gkemulticloud.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.gkemulticloud.v1.AzureClusterError.encode(message.errors[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) + $root.google.cloud.gkemulticloud.v1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AzureCluster message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureCluster.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @static + * @param {google.cloud.gkemulticloud.v1.IAzureCluster} message AzureCluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureCluster.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AzureCluster message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AzureCluster} AzureCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureCluster.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureCluster(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.azureRegion = reader.string(); + break; + } + case 17: { + message.resourceGroupId = reader.string(); + break; + } + case 16: { + message.azureClient = reader.string(); + break; + } + case 4: { + message.networking = $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.decode(reader, reader.uint32()); + break; + } + case 5: { + message.controlPlane = $root.google.cloud.gkemulticloud.v1.AzureControlPlane.decode(reader, reader.uint32()); + break; + } + case 6: { + message.authorization = $root.google.cloud.gkemulticloud.v1.AzureAuthorization.decode(reader, reader.uint32()); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + message.endpoint = reader.string(); + break; + } + case 9: { + message.uid = reader.string(); + break; + } + case 10: { + message.reconciling = reader.bool(); + break; + } + case 11: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.etag = reader.string(); + break; + } + case 14: { + 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 18: { + message.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.clusterCaCertificate = reader.string(); + break; + } + case 20: { + message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.decode(reader, reader.uint32()); + break; + } + case 21: { + message.managedResources = $root.google.cloud.gkemulticloud.v1.AzureClusterResources.decode(reader, reader.uint32()); + break; + } + case 23: { + message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.decode(reader, reader.uint32()); + break; + } + case 24: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.gkemulticloud.v1.AzureClusterError.decode(reader, reader.uint32())); + break; + } + case 25: { + message.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AzureCluster message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AzureCluster} AzureCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureCluster.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureCluster message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureCluster.verify = function verify(message) { + if (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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.azureRegion != null && message.hasOwnProperty("azureRegion")) + if (!$util.isString(message.azureRegion)) + return "azureRegion: string expected"; + if (message.resourceGroupId != null && message.hasOwnProperty("resourceGroupId")) + if (!$util.isString(message.resourceGroupId)) + return "resourceGroupId: string expected"; + if (message.azureClient != null && message.hasOwnProperty("azureClient")) + if (!$util.isString(message.azureClient)) + return "azureClient: string expected"; + if (message.networking != null && message.hasOwnProperty("networking")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.verify(message.networking); + if (error) + return "networking." + error; + } + if (message.controlPlane != null && message.hasOwnProperty("controlPlane")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureControlPlane.verify(message.controlPlane); + if (error) + return "controlPlane." + error; + } + if (message.authorization != null && message.hasOwnProperty("authorization")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureAuthorization.verify(message.authorization); + if (error) + return "authorization." + 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.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: 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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: 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.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify(message.workloadIdentityConfig); + if (error) + return "workloadIdentityConfig." + error; + } + if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) + if (!$util.isString(message.clusterCaCertificate)) + return "clusterCaCertificate: string expected"; + if (message.fleet != null && message.hasOwnProperty("fleet")) { + var error = $root.google.cloud.gkemulticloud.v1.Fleet.verify(message.fleet); + if (error) + return "fleet." + error; + } + if (message.managedResources != null && message.hasOwnProperty("managedResources")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureClusterResources.verify(message.managedResources); + if (error) + return "managedResources." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AzureClusterError.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.verify(message.monitoringConfig); + if (error) + return "monitoringConfig." + error; + } + return null; + }; + + /** + * Creates an AzureCluster message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AzureCluster} AzureCluster + */ + AzureCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureCluster) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AzureCluster(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.azureRegion != null) + message.azureRegion = String(object.azureRegion); + if (object.resourceGroupId != null) + message.resourceGroupId = String(object.resourceGroupId); + if (object.azureClient != null) + message.azureClient = String(object.azureClient); + if (object.networking != null) { + if (typeof object.networking !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.networking: object expected"); + message.networking = $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.fromObject(object.networking); + } + if (object.controlPlane != null) { + if (typeof object.controlPlane !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.controlPlane: object expected"); + message.controlPlane = $root.google.cloud.gkemulticloud.v1.AzureControlPlane.fromObject(object.controlPlane); + } + if (object.authorization != null) { + if (typeof object.authorization !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.authorization: object expected"); + message.authorization = $root.google.cloud.gkemulticloud.v1.AzureAuthorization.fromObject(object.authorization); + } + 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 "PROVISIONING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "RECONCILING": + case 3: + message.state = 3; + break; + case "STOPPING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + case "DEGRADED": + case 6: + message.state = 6; + break; + } + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.uid != null) + message.uid = String(object.uid); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.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.gkemulticloud.v1.AzureCluster.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.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.workloadIdentityConfig != null) { + if (typeof object.workloadIdentityConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.workloadIdentityConfig: object expected"); + message.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.fromObject(object.workloadIdentityConfig); + } + if (object.clusterCaCertificate != null) + message.clusterCaCertificate = String(object.clusterCaCertificate); + if (object.fleet != null) { + if (typeof object.fleet !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.fleet: object expected"); + message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.fromObject(object.fleet); + } + if (object.managedResources != null) { + if (typeof object.managedResources !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.managedResources: object expected"); + message.managedResources = $root.google.cloud.gkemulticloud.v1.AzureClusterResources.fromObject(object.managedResources); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.loggingConfig: object expected"); + message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.fromObject(object.loggingConfig); + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.errors: object expected"); + message.errors[i] = $root.google.cloud.gkemulticloud.v1.AzureClusterError.fromObject(object.errors[i]); + } + } + if (object.monitoringConfig != null) { + if (typeof object.monitoringConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.monitoringConfig: object expected"); + message.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.fromObject(object.monitoringConfig); + } + return message; + }; + + /** + * Creates a plain object from an AzureCluster message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @memberof google.cloud.gkemulticloud.v1.AzureCluster * @static - * @param {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest} message GenerateAwsAccessTokenRequest + * @param {google.cloud.gkemulticloud.v1.AzureCluster} message AzureCluster * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateAwsAccessTokenRequest.toObject = function toObject(message, options) { + AzureCluster.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.awsCluster = ""; - if (message.awsCluster != null && message.hasOwnProperty("awsCluster")) - object.awsCluster = message.awsCluster; + if (options.arrays || options.defaults) + object.errors = []; + if (options.objects || options.defaults) + object.annotations = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.azureRegion = ""; + object.networking = null; + object.controlPlane = null; + object.authorization = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.endpoint = ""; + object.uid = ""; + object.reconciling = false; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.azureClient = ""; + object.resourceGroupId = ""; + object.workloadIdentityConfig = null; + object.clusterCaCertificate = ""; + object.fleet = null; + object.managedResources = null; + object.loggingConfig = null; + object.monitoringConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.azureRegion != null && message.hasOwnProperty("azureRegion")) + object.azureRegion = message.azureRegion; + if (message.networking != null && message.hasOwnProperty("networking")) + object.networking = $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.toObject(message.networking, options); + if (message.controlPlane != null && message.hasOwnProperty("controlPlane")) + object.controlPlane = $root.google.cloud.gkemulticloud.v1.AzureControlPlane.toObject(message.controlPlane, options); + if (message.authorization != null && message.hasOwnProperty("authorization")) + object.authorization = $root.google.cloud.gkemulticloud.v1.AzureAuthorization.toObject(message.authorization, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AzureCluster.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AzureCluster.State[message.state] : message.state; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + 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; + 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.azureClient != null && message.hasOwnProperty("azureClient")) + object.azureClient = message.azureClient; + if (message.resourceGroupId != null && message.hasOwnProperty("resourceGroupId")) + object.resourceGroupId = message.resourceGroupId; + if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) + object.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.toObject(message.workloadIdentityConfig, options); + if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) + object.clusterCaCertificate = message.clusterCaCertificate; + if (message.fleet != null && message.hasOwnProperty("fleet")) + object.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.toObject(message.fleet, options); + if (message.managedResources != null && message.hasOwnProperty("managedResources")) + object.managedResources = $root.google.cloud.gkemulticloud.v1.AzureClusterResources.toObject(message.managedResources, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.toObject(message.loggingConfig, options); + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.gkemulticloud.v1.AzureClusterError.toObject(message.errors[j], options); + } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) + object.monitoringConfig = $root.google.cloud.gkemulticloud.v1.MonitoringConfig.toObject(message.monitoringConfig, options); return object; }; /** - * Converts this GenerateAwsAccessTokenRequest to JSON. + * Converts this AzureCluster to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @memberof google.cloud.gkemulticloud.v1.AzureCluster * @instance * @returns {Object.} JSON object */ - GenerateAwsAccessTokenRequest.prototype.toJSON = function toJSON() { + AzureCluster.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GenerateAwsAccessTokenRequest + * Gets the default type url for AzureCluster * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest + * @memberof google.cloud.gkemulticloud.v1.AzureCluster * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerateAwsAccessTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenRequest"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureCluster"; }; - return GenerateAwsAccessTokenRequest; + /** + * State enum. + * @name google.cloud.gkemulticloud.v1.AzureCluster.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PROVISIONING=1 PROVISIONING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} RECONCILING=3 RECONCILING value + * @property {number} STOPPING=4 STOPPING value + * @property {number} ERROR=5 ERROR value + * @property {number} DEGRADED=6 DEGRADED value + */ + AzureCluster.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "RECONCILING"] = 3; + values[valuesById[4] = "STOPPING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + values[valuesById[6] = "DEGRADED"] = 6; + return values; + })(); + + return AzureCluster; })(); - v1.GenerateAwsAccessTokenResponse = (function() { + v1.AzureClusterNetworking = (function() { /** - * Properties of a GenerateAwsAccessTokenResponse. + * Properties of an AzureClusterNetworking. * @memberof google.cloud.gkemulticloud.v1 - * @interface IGenerateAwsAccessTokenResponse - * @property {string|null} [accessToken] GenerateAwsAccessTokenResponse accessToken - * @property {google.protobuf.ITimestamp|null} [expirationTime] GenerateAwsAccessTokenResponse expirationTime + * @interface IAzureClusterNetworking + * @property {string|null} [virtualNetworkId] AzureClusterNetworking virtualNetworkId + * @property {Array.|null} [podAddressCidrBlocks] AzureClusterNetworking podAddressCidrBlocks + * @property {Array.|null} [serviceAddressCidrBlocks] AzureClusterNetworking serviceAddressCidrBlocks + * @property {string|null} [serviceLoadBalancerSubnetId] AzureClusterNetworking serviceLoadBalancerSubnetId */ /** - * Constructs a new GenerateAwsAccessTokenResponse. + * Constructs a new AzureClusterNetworking. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a GenerateAwsAccessTokenResponse. - * @implements IGenerateAwsAccessTokenResponse + * @classdesc Represents an AzureClusterNetworking. + * @implements IAzureClusterNetworking * @constructor - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureClusterNetworking=} [properties] Properties to set */ - function GenerateAwsAccessTokenResponse(properties) { + function AzureClusterNetworking(properties) { + this.podAddressCidrBlocks = []; + this.serviceAddressCidrBlocks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11332,89 +18616,123 @@ } /** - * GenerateAwsAccessTokenResponse accessToken. - * @member {string} accessToken - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * AzureClusterNetworking virtualNetworkId. + * @member {string} virtualNetworkId + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @instance */ - GenerateAwsAccessTokenResponse.prototype.accessToken = ""; + AzureClusterNetworking.prototype.virtualNetworkId = ""; /** - * GenerateAwsAccessTokenResponse expirationTime. - * @member {google.protobuf.ITimestamp|null|undefined} expirationTime - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * AzureClusterNetworking podAddressCidrBlocks. + * @member {Array.} podAddressCidrBlocks + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @instance */ - GenerateAwsAccessTokenResponse.prototype.expirationTime = null; + AzureClusterNetworking.prototype.podAddressCidrBlocks = $util.emptyArray; /** - * Creates a new GenerateAwsAccessTokenResponse instance using the specified properties. + * AzureClusterNetworking serviceAddressCidrBlocks. + * @member {Array.} serviceAddressCidrBlocks + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @instance + */ + AzureClusterNetworking.prototype.serviceAddressCidrBlocks = $util.emptyArray; + + /** + * AzureClusterNetworking serviceLoadBalancerSubnetId. + * @member {string} serviceLoadBalancerSubnetId + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @instance + */ + AzureClusterNetworking.prototype.serviceLoadBalancerSubnetId = ""; + + /** + * Creates a new AzureClusterNetworking instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @static - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} GenerateAwsAccessTokenResponse instance + * @param {google.cloud.gkemulticloud.v1.IAzureClusterNetworking=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureClusterNetworking} AzureClusterNetworking instance */ - GenerateAwsAccessTokenResponse.create = function create(properties) { - return new GenerateAwsAccessTokenResponse(properties); + AzureClusterNetworking.create = function create(properties) { + return new AzureClusterNetworking(properties); }; /** - * Encodes the specified GenerateAwsAccessTokenResponse message. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.verify|verify} messages. + * Encodes the specified AzureClusterNetworking message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterNetworking.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @static - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse} message GenerateAwsAccessTokenResponse message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClusterNetworking} message AzureClusterNetworking message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateAwsAccessTokenResponse.encode = function encode(message, writer) { + AzureClusterNetworking.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.accessToken != null && Object.hasOwnProperty.call(message, "accessToken")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.accessToken); - if (message.expirationTime != null && Object.hasOwnProperty.call(message, "expirationTime")) - $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.virtualNetworkId != null && Object.hasOwnProperty.call(message, "virtualNetworkId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.virtualNetworkId); + if (message.podAddressCidrBlocks != null && message.podAddressCidrBlocks.length) + for (var i = 0; i < message.podAddressCidrBlocks.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.podAddressCidrBlocks[i]); + if (message.serviceAddressCidrBlocks != null && message.serviceAddressCidrBlocks.length) + for (var i = 0; i < message.serviceAddressCidrBlocks.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAddressCidrBlocks[i]); + if (message.serviceLoadBalancerSubnetId != null && Object.hasOwnProperty.call(message, "serviceLoadBalancerSubnetId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceLoadBalancerSubnetId); return writer; }; /** - * Encodes the specified GenerateAwsAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.verify|verify} messages. + * Encodes the specified AzureClusterNetworking message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterNetworking.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @static - * @param {google.cloud.gkemulticloud.v1.IGenerateAwsAccessTokenResponse} message GenerateAwsAccessTokenResponse message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClusterNetworking} message AzureClusterNetworking message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateAwsAccessTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + AzureClusterNetworking.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerateAwsAccessTokenResponse message from the specified reader or buffer. + * Decodes an AzureClusterNetworking message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} GenerateAwsAccessTokenResponse + * @returns {google.cloud.gkemulticloud.v1.AzureClusterNetworking} AzureClusterNetworking * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateAwsAccessTokenResponse.decode = function decode(reader, length) { + AzureClusterNetworking.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.accessToken = reader.string(); + message.virtualNetworkId = reader.string(); break; } case 2: { - message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.podAddressCidrBlocks && message.podAddressCidrBlocks.length)) + message.podAddressCidrBlocks = []; + message.podAddressCidrBlocks.push(reader.string()); + break; + } + case 3: { + if (!(message.serviceAddressCidrBlocks && message.serviceAddressCidrBlocks.length)) + message.serviceAddressCidrBlocks = []; + message.serviceAddressCidrBlocks.push(reader.string()); + break; + } + case 5: { + message.serviceLoadBalancerSubnetId = reader.string(); break; } default: @@ -11426,495 +18744,411 @@ }; /** - * Decodes a GenerateAwsAccessTokenResponse message from the specified reader or buffer, length delimited. + * Decodes an AzureClusterNetworking message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} GenerateAwsAccessTokenResponse + * @returns {google.cloud.gkemulticloud.v1.AzureClusterNetworking} AzureClusterNetworking * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateAwsAccessTokenResponse.decodeDelimited = function decodeDelimited(reader) { + AzureClusterNetworking.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GenerateAwsAccessTokenResponse message. + * Verifies an AzureClusterNetworking message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GenerateAwsAccessTokenResponse.verify = function verify(message) { + AzureClusterNetworking.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.accessToken != null && message.hasOwnProperty("accessToken")) - if (!$util.isString(message.accessToken)) - return "accessToken: string expected"; - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expirationTime); - if (error) - return "expirationTime." + error; + if (message.virtualNetworkId != null && message.hasOwnProperty("virtualNetworkId")) + if (!$util.isString(message.virtualNetworkId)) + return "virtualNetworkId: string expected"; + if (message.podAddressCidrBlocks != null && message.hasOwnProperty("podAddressCidrBlocks")) { + if (!Array.isArray(message.podAddressCidrBlocks)) + return "podAddressCidrBlocks: array expected"; + for (var i = 0; i < message.podAddressCidrBlocks.length; ++i) + if (!$util.isString(message.podAddressCidrBlocks[i])) + return "podAddressCidrBlocks: string[] expected"; + } + if (message.serviceAddressCidrBlocks != null && message.hasOwnProperty("serviceAddressCidrBlocks")) { + if (!Array.isArray(message.serviceAddressCidrBlocks)) + return "serviceAddressCidrBlocks: array expected"; + for (var i = 0; i < message.serviceAddressCidrBlocks.length; ++i) + if (!$util.isString(message.serviceAddressCidrBlocks[i])) + return "serviceAddressCidrBlocks: string[] expected"; } + if (message.serviceLoadBalancerSubnetId != null && message.hasOwnProperty("serviceLoadBalancerSubnetId")) + if (!$util.isString(message.serviceLoadBalancerSubnetId)) + return "serviceLoadBalancerSubnetId: string expected"; return null; }; /** - * Creates a GenerateAwsAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AzureClusterNetworking message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} GenerateAwsAccessTokenResponse + * @returns {google.cloud.gkemulticloud.v1.AzureClusterNetworking} AzureClusterNetworking */ - GenerateAwsAccessTokenResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse) + AzureClusterNetworking.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking) return object; - var message = new $root.google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse(); - if (object.accessToken != null) - message.accessToken = String(object.accessToken); - if (object.expirationTime != null) { - if (typeof object.expirationTime !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse.expirationTime: object expected"); - message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime); + var message = new $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking(); + if (object.virtualNetworkId != null) + message.virtualNetworkId = String(object.virtualNetworkId); + if (object.podAddressCidrBlocks) { + if (!Array.isArray(object.podAddressCidrBlocks)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureClusterNetworking.podAddressCidrBlocks: array expected"); + message.podAddressCidrBlocks = []; + for (var i = 0; i < object.podAddressCidrBlocks.length; ++i) + message.podAddressCidrBlocks[i] = String(object.podAddressCidrBlocks[i]); + } + if (object.serviceAddressCidrBlocks) { + if (!Array.isArray(object.serviceAddressCidrBlocks)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureClusterNetworking.serviceAddressCidrBlocks: array expected"); + message.serviceAddressCidrBlocks = []; + for (var i = 0; i < object.serviceAddressCidrBlocks.length; ++i) + message.serviceAddressCidrBlocks[i] = String(object.serviceAddressCidrBlocks[i]); } + if (object.serviceLoadBalancerSubnetId != null) + message.serviceLoadBalancerSubnetId = String(object.serviceLoadBalancerSubnetId); return message; }; /** - * Creates a plain object from a GenerateAwsAccessTokenResponse message. Also converts values to other types if specified. + * Creates a plain object from an AzureClusterNetworking message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @static - * @param {google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse} message GenerateAwsAccessTokenResponse + * @param {google.cloud.gkemulticloud.v1.AzureClusterNetworking} message AzureClusterNetworking * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateAwsAccessTokenResponse.toObject = function toObject(message, options) { + AzureClusterNetworking.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.accessToken = ""; - object.expirationTime = null; + if (options.arrays || options.defaults) { + object.podAddressCidrBlocks = []; + object.serviceAddressCidrBlocks = []; } - if (message.accessToken != null && message.hasOwnProperty("accessToken")) - object.accessToken = message.accessToken; - if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) - object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); - return object; - }; - - /** - * Converts this GenerateAwsAccessTokenResponse to JSON. - * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse - * @instance - * @returns {Object.} JSON object - */ - GenerateAwsAccessTokenResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GenerateAwsAccessTokenResponse - * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenerateAwsAccessTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + if (options.defaults) { + object.virtualNetworkId = ""; + object.serviceLoadBalancerSubnetId = ""; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.GenerateAwsAccessTokenResponse"; - }; - - return GenerateAwsAccessTokenResponse; - })(); - - v1.AzureCluster = (function() { - - /** - * Properties of an AzureCluster. - * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureCluster - * @property {string|null} [name] AzureCluster name - * @property {string|null} [description] AzureCluster description - * @property {string|null} [azureRegion] AzureCluster azureRegion - * @property {string|null} [resourceGroupId] AzureCluster resourceGroupId - * @property {string|null} [azureClient] AzureCluster azureClient - * @property {google.cloud.gkemulticloud.v1.IAzureClusterNetworking|null} [networking] AzureCluster networking - * @property {google.cloud.gkemulticloud.v1.IAzureControlPlane|null} [controlPlane] AzureCluster controlPlane - * @property {google.cloud.gkemulticloud.v1.IAzureAuthorization|null} [authorization] AzureCluster authorization - * @property {google.cloud.gkemulticloud.v1.AzureCluster.State|null} [state] AzureCluster state - * @property {string|null} [endpoint] AzureCluster endpoint - * @property {string|null} [uid] AzureCluster uid - * @property {boolean|null} [reconciling] AzureCluster reconciling - * @property {google.protobuf.ITimestamp|null} [createTime] AzureCluster createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] AzureCluster updateTime - * @property {string|null} [etag] AzureCluster etag - * @property {Object.|null} [annotations] AzureCluster annotations - * @property {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null} [workloadIdentityConfig] AzureCluster workloadIdentityConfig - * @property {string|null} [clusterCaCertificate] AzureCluster clusterCaCertificate - * @property {google.cloud.gkemulticloud.v1.IFleet|null} [fleet] AzureCluster fleet - * @property {google.cloud.gkemulticloud.v1.IAzureClusterResources|null} [managedResources] AzureCluster managedResources - * @property {google.cloud.gkemulticloud.v1.ILoggingConfig|null} [loggingConfig] AzureCluster loggingConfig - */ - - /** - * Constructs a new AzureCluster. - * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureCluster. - * @implements IAzureCluster - * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureCluster=} [properties] Properties to set - */ - function AzureCluster(properties) { - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AzureCluster name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @instance - */ - AzureCluster.prototype.name = ""; - - /** - * AzureCluster description. - * @member {string} description - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @instance - */ - AzureCluster.prototype.description = ""; - - /** - * AzureCluster azureRegion. - * @member {string} azureRegion - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @instance - */ - AzureCluster.prototype.azureRegion = ""; + if (message.virtualNetworkId != null && message.hasOwnProperty("virtualNetworkId")) + object.virtualNetworkId = message.virtualNetworkId; + if (message.podAddressCidrBlocks && message.podAddressCidrBlocks.length) { + object.podAddressCidrBlocks = []; + for (var j = 0; j < message.podAddressCidrBlocks.length; ++j) + object.podAddressCidrBlocks[j] = message.podAddressCidrBlocks[j]; + } + if (message.serviceAddressCidrBlocks && message.serviceAddressCidrBlocks.length) { + object.serviceAddressCidrBlocks = []; + for (var j = 0; j < message.serviceAddressCidrBlocks.length; ++j) + object.serviceAddressCidrBlocks[j] = message.serviceAddressCidrBlocks[j]; + } + if (message.serviceLoadBalancerSubnetId != null && message.hasOwnProperty("serviceLoadBalancerSubnetId")) + object.serviceLoadBalancerSubnetId = message.serviceLoadBalancerSubnetId; + return object; + }; /** - * AzureCluster resourceGroupId. - * @member {string} resourceGroupId - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * Converts this AzureClusterNetworking to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking * @instance + * @returns {Object.} JSON object */ - AzureCluster.prototype.resourceGroupId = ""; + AzureClusterNetworking.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * AzureCluster azureClient. - * @member {string} azureClient - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @instance + * Gets the default type url for AzureClusterNetworking + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - AzureCluster.prototype.azureClient = ""; + AzureClusterNetworking.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClusterNetworking"; + }; - /** - * AzureCluster networking. - * @member {google.cloud.gkemulticloud.v1.IAzureClusterNetworking|null|undefined} networking - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @instance - */ - AzureCluster.prototype.networking = null; + return AzureClusterNetworking; + })(); - /** - * AzureCluster controlPlane. - * @member {google.cloud.gkemulticloud.v1.IAzureControlPlane|null|undefined} controlPlane - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @instance - */ - AzureCluster.prototype.controlPlane = null; + v1.AzureControlPlane = (function() { /** - * AzureCluster authorization. - * @member {google.cloud.gkemulticloud.v1.IAzureAuthorization|null|undefined} authorization - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @instance + * Properties of an AzureControlPlane. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAzureControlPlane + * @property {string|null} [version] AzureControlPlane version + * @property {string|null} [subnetId] AzureControlPlane subnetId + * @property {string|null} [vmSize] AzureControlPlane vmSize + * @property {google.cloud.gkemulticloud.v1.IAzureSshConfig|null} [sshConfig] AzureControlPlane sshConfig + * @property {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null} [rootVolume] AzureControlPlane rootVolume + * @property {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null} [mainVolume] AzureControlPlane mainVolume + * @property {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption|null} [databaseEncryption] AzureControlPlane databaseEncryption + * @property {google.cloud.gkemulticloud.v1.IAzureProxyConfig|null} [proxyConfig] AzureControlPlane proxyConfig + * @property {google.cloud.gkemulticloud.v1.IAzureConfigEncryption|null} [configEncryption] AzureControlPlane configEncryption + * @property {Object.|null} [tags] AzureControlPlane tags + * @property {Array.|null} [replicaPlacements] AzureControlPlane replicaPlacements + * @property {string|null} [endpointSubnetId] AzureControlPlane endpointSubnetId */ - AzureCluster.prototype.authorization = null; /** - * AzureCluster state. - * @member {google.cloud.gkemulticloud.v1.AzureCluster.State} state - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @instance + * Constructs a new AzureControlPlane. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AzureControlPlane. + * @implements IAzureControlPlane + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAzureControlPlane=} [properties] Properties to set */ - AzureCluster.prototype.state = 0; + function AzureControlPlane(properties) { + this.tags = {}; + this.replicaPlacements = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * AzureCluster endpoint. - * @member {string} endpoint - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane version. + * @member {string} version + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.endpoint = ""; + AzureControlPlane.prototype.version = ""; /** - * AzureCluster uid. - * @member {string} uid - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane subnetId. + * @member {string} subnetId + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.uid = ""; + AzureControlPlane.prototype.subnetId = ""; /** - * AzureCluster reconciling. - * @member {boolean} reconciling - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane vmSize. + * @member {string} vmSize + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.reconciling = false; + AzureControlPlane.prototype.vmSize = ""; /** - * AzureCluster createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane sshConfig. + * @member {google.cloud.gkemulticloud.v1.IAzureSshConfig|null|undefined} sshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.createTime = null; + AzureControlPlane.prototype.sshConfig = null; /** - * AzureCluster updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane rootVolume. + * @member {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null|undefined} rootVolume + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.updateTime = null; + AzureControlPlane.prototype.rootVolume = null; /** - * AzureCluster etag. - * @member {string} etag - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane mainVolume. + * @member {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null|undefined} mainVolume + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.etag = ""; + AzureControlPlane.prototype.mainVolume = null; /** - * AzureCluster annotations. - * @member {Object.} annotations - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane databaseEncryption. + * @member {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption|null|undefined} databaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.annotations = $util.emptyObject; + AzureControlPlane.prototype.databaseEncryption = null; /** - * AzureCluster workloadIdentityConfig. - * @member {google.cloud.gkemulticloud.v1.IWorkloadIdentityConfig|null|undefined} workloadIdentityConfig - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane proxyConfig. + * @member {google.cloud.gkemulticloud.v1.IAzureProxyConfig|null|undefined} proxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.workloadIdentityConfig = null; + AzureControlPlane.prototype.proxyConfig = null; /** - * AzureCluster clusterCaCertificate. - * @member {string} clusterCaCertificate - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane configEncryption. + * @member {google.cloud.gkemulticloud.v1.IAzureConfigEncryption|null|undefined} configEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.clusterCaCertificate = ""; + AzureControlPlane.prototype.configEncryption = null; /** - * AzureCluster fleet. - * @member {google.cloud.gkemulticloud.v1.IFleet|null|undefined} fleet - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane tags. + * @member {Object.} tags + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.fleet = null; + AzureControlPlane.prototype.tags = $util.emptyObject; /** - * AzureCluster managedResources. - * @member {google.cloud.gkemulticloud.v1.IAzureClusterResources|null|undefined} managedResources - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane replicaPlacements. + * @member {Array.} replicaPlacements + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.managedResources = null; + AzureControlPlane.prototype.replicaPlacements = $util.emptyArray; /** - * AzureCluster loggingConfig. - * @member {google.cloud.gkemulticloud.v1.ILoggingConfig|null|undefined} loggingConfig - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * AzureControlPlane endpointSubnetId. + * @member {string} endpointSubnetId + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance */ - AzureCluster.prototype.loggingConfig = null; + AzureControlPlane.prototype.endpointSubnetId = ""; /** - * Creates a new AzureCluster instance using the specified properties. + * Creates a new AzureControlPlane instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @static - * @param {google.cloud.gkemulticloud.v1.IAzureCluster=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureCluster} AzureCluster instance - */ - AzureCluster.create = function create(properties) { - return new AzureCluster(properties); - }; - - /** - * Encodes the specified AzureCluster message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureCluster.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureCluster - * @static - * @param {google.cloud.gkemulticloud.v1.IAzureCluster} message AzureCluster message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AzureCluster.encode = function encode(message, writer) { - 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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.azureRegion != null && Object.hasOwnProperty.call(message, "azureRegion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.azureRegion); - if (message.networking != null && Object.hasOwnProperty.call(message, "networking")) - $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.encode(message.networking, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.controlPlane != null && Object.hasOwnProperty.call(message, "controlPlane")) - $root.google.cloud.gkemulticloud.v1.AzureControlPlane.encode(message.controlPlane, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.authorization != null && Object.hasOwnProperty.call(message, "authorization")) - $root.google.cloud.gkemulticloud.v1.AzureAuthorization.encode(message.authorization, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpoint); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.uid); - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.reconciling); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); - 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.azureClient != null && Object.hasOwnProperty.call(message, "azureClient")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.azureClient); - if (message.resourceGroupId != null && Object.hasOwnProperty.call(message, "resourceGroupId")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.resourceGroupId); - if (message.workloadIdentityConfig != null && Object.hasOwnProperty.call(message, "workloadIdentityConfig")) - $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.encode(message.workloadIdentityConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.clusterCaCertificate != null && Object.hasOwnProperty.call(message, "clusterCaCertificate")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.clusterCaCertificate); - if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) - $root.google.cloud.gkemulticloud.v1.Fleet.encode(message.fleet, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.managedResources != null && Object.hasOwnProperty.call(message, "managedResources")) - $root.google.cloud.gkemulticloud.v1.AzureClusterResources.encode(message.managedResources, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.cloud.gkemulticloud.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @static + * @param {google.cloud.gkemulticloud.v1.IAzureControlPlane=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureControlPlane} AzureControlPlane instance + */ + AzureControlPlane.create = function create(properties) { + return new AzureControlPlane(properties); + }; + + /** + * Encodes the specified AzureControlPlane message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureControlPlane.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @static + * @param {google.cloud.gkemulticloud.v1.IAzureControlPlane} message AzureControlPlane message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AzureControlPlane.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.subnetId != null && Object.hasOwnProperty.call(message, "subnetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetId); + if (message.vmSize != null && Object.hasOwnProperty.call(message, "vmSize")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.vmSize); + if (message.rootVolume != null && Object.hasOwnProperty.call(message, "rootVolume")) + $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.encode(message.rootVolume, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.mainVolume != null && Object.hasOwnProperty.call(message, "mainVolume")) + $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.encode(message.mainVolume, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + for (var keys = Object.keys(message.tags), 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.tags[keys[i]]).ldelim(); + if (message.databaseEncryption != null && Object.hasOwnProperty.call(message, "databaseEncryption")) + $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.encode(message.databaseEncryption, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sshConfig != null && Object.hasOwnProperty.call(message, "sshConfig")) + $root.google.cloud.gkemulticloud.v1.AzureSshConfig.encode(message.sshConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.proxyConfig != null && Object.hasOwnProperty.call(message, "proxyConfig")) + $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.encode(message.proxyConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.replicaPlacements != null && message.replicaPlacements.length) + for (var i = 0; i < message.replicaPlacements.length; ++i) + $root.google.cloud.gkemulticloud.v1.ReplicaPlacement.encode(message.replicaPlacements[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.configEncryption != null && Object.hasOwnProperty.call(message, "configEncryption")) + $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.encode(message.configEncryption, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.endpointSubnetId != null && Object.hasOwnProperty.call(message, "endpointSubnetId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.endpointSubnetId); return writer; }; /** - * Encodes the specified AzureCluster message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureCluster.verify|verify} messages. + * Encodes the specified AzureControlPlane message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureControlPlane.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @static - * @param {google.cloud.gkemulticloud.v1.IAzureCluster} message AzureCluster message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureControlPlane} message AzureControlPlane message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureCluster.encodeDelimited = function encodeDelimited(message, writer) { + AzureControlPlane.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureCluster message from the specified reader or buffer. + * Decodes an AzureControlPlane message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureCluster} AzureCluster + * @returns {google.cloud.gkemulticloud.v1.AzureControlPlane} AzureControlPlane * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureCluster.decode = function decode(reader, length) { + AzureControlPlane.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureCluster(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureControlPlane(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.version = reader.string(); break; } case 2: { - message.description = reader.string(); + message.subnetId = reader.string(); break; } case 3: { - message.azureRegion = reader.string(); - break; - } - case 17: { - message.resourceGroupId = reader.string(); + message.vmSize = reader.string(); break; } - case 16: { - message.azureClient = reader.string(); + case 11: { + message.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.decode(reader, reader.uint32()); break; } case 4: { - message.networking = $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.decode(reader, reader.uint32()); + message.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.decode(reader, reader.uint32()); break; } case 5: { - message.controlPlane = $root.google.cloud.gkemulticloud.v1.AzureControlPlane.decode(reader, reader.uint32()); - break; - } - case 6: { - message.authorization = $root.google.cloud.gkemulticloud.v1.AzureAuthorization.decode(reader, reader.uint32()); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - message.endpoint = reader.string(); - break; - } - case 9: { - message.uid = reader.string(); + message.mainVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.decode(reader, reader.uint32()); break; } case 10: { - message.reconciling = reader.bool(); - break; - } - case 11: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.decode(reader, reader.uint32()); break; } case 12: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.decode(reader, reader.uint32()); break; } - case 13: { - message.etag = reader.string(); + case 14: { + message.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.decode(reader, reader.uint32()); break; } - case 14: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; + case 7: { + if (message.tags === $util.emptyObject) + message.tags = {}; var end2 = reader.uint32() + reader.pos; key = ""; value = ""; @@ -11932,27 +19166,17 @@ break; } } - message.annotations[key] = value; - break; - } - case 18: { - message.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.clusterCaCertificate = reader.string(); - break; - } - case 20: { - message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.decode(reader, reader.uint32()); + message.tags[key] = value; break; } - case 21: { - message.managedResources = $root.google.cloud.gkemulticloud.v1.AzureClusterResources.decode(reader, reader.uint32()); + case 13: { + if (!(message.replicaPlacements && message.replicaPlacements.length)) + message.replicaPlacements = []; + message.replicaPlacements.push($root.google.cloud.gkemulticloud.v1.ReplicaPlacement.decode(reader, reader.uint32())); break; } - case 23: { - message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.decode(reader, reader.uint32()); + case 15: { + message.endpointSubnetId = reader.string(); break; } default: @@ -11964,416 +19188,275 @@ }; /** - * Decodes an AzureCluster message from the specified reader or buffer, length delimited. + * Decodes an AzureControlPlane message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureCluster} AzureCluster + * @returns {google.cloud.gkemulticloud.v1.AzureControlPlane} AzureControlPlane * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureCluster.decodeDelimited = function decodeDelimited(reader) { + AzureControlPlane.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureCluster message. + * Verifies an AzureControlPlane message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureCluster.verify = function verify(message) { + AzureControlPlane.verify = function verify(message) { if (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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.azureRegion != null && message.hasOwnProperty("azureRegion")) - if (!$util.isString(message.azureRegion)) - return "azureRegion: string expected"; - if (message.resourceGroupId != null && message.hasOwnProperty("resourceGroupId")) - if (!$util.isString(message.resourceGroupId)) - return "resourceGroupId: string expected"; - if (message.azureClient != null && message.hasOwnProperty("azureClient")) - if (!$util.isString(message.azureClient)) - return "azureClient: string expected"; - if (message.networking != null && message.hasOwnProperty("networking")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.verify(message.networking); - if (error) - return "networking." + error; - } - if (message.controlPlane != null && message.hasOwnProperty("controlPlane")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureControlPlane.verify(message.controlPlane); - if (error) - return "controlPlane." + error; - } - if (message.authorization != null && message.hasOwnProperty("authorization")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureAuthorization.verify(message.authorization); - if (error) - return "authorization." + 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.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - if (typeof message.reconciling !== "boolean") - return "reconciling: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.subnetId != null && message.hasOwnProperty("subnetId")) + if (!$util.isString(message.subnetId)) + return "subnetId: string expected"; + if (message.vmSize != null && message.hasOwnProperty("vmSize")) + if (!$util.isString(message.vmSize)) + return "vmSize: string expected"; + if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.verify(message.sshConfig); if (error) - return "createTime." + error; + return "sshConfig." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify(message.rootVolume); if (error) - return "updateTime." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: 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"; + return "rootVolume." + error; } - if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.verify(message.workloadIdentityConfig); + if (message.mainVolume != null && message.hasOwnProperty("mainVolume")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify(message.mainVolume); if (error) - return "workloadIdentityConfig." + error; + return "mainVolume." + error; } - if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) - if (!$util.isString(message.clusterCaCertificate)) - return "clusterCaCertificate: string expected"; - if (message.fleet != null && message.hasOwnProperty("fleet")) { - var error = $root.google.cloud.gkemulticloud.v1.Fleet.verify(message.fleet); + if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.verify(message.databaseEncryption); if (error) - return "fleet." + error; + return "databaseEncryption." + error; } - if (message.managedResources != null && message.hasOwnProperty("managedResources")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureClusterResources.verify(message.managedResources); + if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.verify(message.proxyConfig); if (error) - return "managedResources." + error; + return "proxyConfig." + error; } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.LoggingConfig.verify(message.loggingConfig); + if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.verify(message.configEncryption); if (error) - return "loggingConfig." + error; + return "configEncryption." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!$util.isObject(message.tags)) + return "tags: object expected"; + var key = Object.keys(message.tags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.tags[key[i]])) + return "tags: string{k:string} expected"; + } + if (message.replicaPlacements != null && message.hasOwnProperty("replicaPlacements")) { + if (!Array.isArray(message.replicaPlacements)) + return "replicaPlacements: array expected"; + for (var i = 0; i < message.replicaPlacements.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.ReplicaPlacement.verify(message.replicaPlacements[i]); + if (error) + return "replicaPlacements." + error; + } } + if (message.endpointSubnetId != null && message.hasOwnProperty("endpointSubnetId")) + if (!$util.isString(message.endpointSubnetId)) + return "endpointSubnetId: string expected"; return null; }; /** - * Creates an AzureCluster message from a plain object. Also converts values to their respective internal types. + * Creates an AzureControlPlane message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureCluster} AzureCluster + * @returns {google.cloud.gkemulticloud.v1.AzureControlPlane} AzureControlPlane */ - AzureCluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureCluster) + AzureControlPlane.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureControlPlane) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureCluster(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.azureRegion != null) - message.azureRegion = String(object.azureRegion); - if (object.resourceGroupId != null) - message.resourceGroupId = String(object.resourceGroupId); - if (object.azureClient != null) - message.azureClient = String(object.azureClient); - if (object.networking != null) { - if (typeof object.networking !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.networking: object expected"); - message.networking = $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.fromObject(object.networking); - } - if (object.controlPlane != null) { - if (typeof object.controlPlane !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.controlPlane: object expected"); - message.controlPlane = $root.google.cloud.gkemulticloud.v1.AzureControlPlane.fromObject(object.controlPlane); - } - if (object.authorization != null) { - if (typeof object.authorization !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.authorization: object expected"); - message.authorization = $root.google.cloud.gkemulticloud.v1.AzureAuthorization.fromObject(object.authorization); - } - 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 "PROVISIONING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "RECONCILING": - case 3: - message.state = 3; - break; - case "STOPPING": - case 4: - message.state = 4; - break; - case "ERROR": - case 5: - message.state = 5; - break; - case "DEGRADED": - case 6: - message.state = 6; - break; + var message = new $root.google.cloud.gkemulticloud.v1.AzureControlPlane(); + if (object.version != null) + message.version = String(object.version); + if (object.subnetId != null) + message.subnetId = String(object.subnetId); + if (object.vmSize != null) + message.vmSize = String(object.vmSize); + if (object.sshConfig != null) { + if (typeof object.sshConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.sshConfig: object expected"); + message.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.fromObject(object.sshConfig); } - if (object.endpoint != null) - message.endpoint = String(object.endpoint); - if (object.uid != null) - message.uid = String(object.uid); - if (object.reconciling != null) - message.reconciling = Boolean(object.reconciling); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + if (object.rootVolume != null) { + if (typeof object.rootVolume !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.rootVolume: object expected"); + message.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.fromObject(object.rootVolume); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.mainVolume != null) { + if (typeof object.mainVolume !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.mainVolume: object expected"); + message.mainVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.fromObject(object.mainVolume); } - if (object.etag != null) - message.etag = String(object.etag); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.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.databaseEncryption != null) { + if (typeof object.databaseEncryption !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.databaseEncryption: object expected"); + message.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.fromObject(object.databaseEncryption); } - if (object.workloadIdentityConfig != null) { - if (typeof object.workloadIdentityConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.workloadIdentityConfig: object expected"); - message.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.fromObject(object.workloadIdentityConfig); + if (object.proxyConfig != null) { + if (typeof object.proxyConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.proxyConfig: object expected"); + message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.fromObject(object.proxyConfig); } - if (object.clusterCaCertificate != null) - message.clusterCaCertificate = String(object.clusterCaCertificate); - if (object.fleet != null) { - if (typeof object.fleet !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.fleet: object expected"); - message.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.fromObject(object.fleet); + if (object.configEncryption != null) { + if (typeof object.configEncryption !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.configEncryption: object expected"); + message.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.fromObject(object.configEncryption); } - if (object.managedResources != null) { - if (typeof object.managedResources !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.managedResources: object expected"); - message.managedResources = $root.google.cloud.gkemulticloud.v1.AzureClusterResources.fromObject(object.managedResources); + if (object.tags) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.tags: object expected"); + message.tags = {}; + for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) + message.tags[keys[i]] = String(object.tags[keys[i]]); } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureCluster.loggingConfig: object expected"); - message.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.fromObject(object.loggingConfig); + if (object.replicaPlacements) { + if (!Array.isArray(object.replicaPlacements)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.replicaPlacements: array expected"); + message.replicaPlacements = []; + for (var i = 0; i < object.replicaPlacements.length; ++i) { + if (typeof object.replicaPlacements[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.replicaPlacements: object expected"); + message.replicaPlacements[i] = $root.google.cloud.gkemulticloud.v1.ReplicaPlacement.fromObject(object.replicaPlacements[i]); + } } + if (object.endpointSubnetId != null) + message.endpointSubnetId = String(object.endpointSubnetId); return message; }; /** - * Creates a plain object from an AzureCluster message. Also converts values to other types if specified. + * Creates a plain object from an AzureControlPlane message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @static - * @param {google.cloud.gkemulticloud.v1.AzureCluster} message AzureCluster + * @param {google.cloud.gkemulticloud.v1.AzureControlPlane} message AzureControlPlane * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureCluster.toObject = function toObject(message, options) { + AzureControlPlane.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.replicaPlacements = []; if (options.objects || options.defaults) - object.annotations = {}; + object.tags = {}; if (options.defaults) { - object.name = ""; - object.description = ""; - object.azureRegion = ""; - object.networking = null; - object.controlPlane = null; - object.authorization = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.endpoint = ""; - object.uid = ""; - object.reconciling = false; - object.createTime = null; - object.updateTime = null; - object.etag = ""; - object.azureClient = ""; - object.resourceGroupId = ""; - object.workloadIdentityConfig = null; - object.clusterCaCertificate = ""; - object.fleet = null; - object.managedResources = null; - object.loggingConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.azureRegion != null && message.hasOwnProperty("azureRegion")) - object.azureRegion = message.azureRegion; - if (message.networking != null && message.hasOwnProperty("networking")) - object.networking = $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking.toObject(message.networking, options); - if (message.controlPlane != null && message.hasOwnProperty("controlPlane")) - object.controlPlane = $root.google.cloud.gkemulticloud.v1.AzureControlPlane.toObject(message.controlPlane, options); - if (message.authorization != null && message.hasOwnProperty("authorization")) - object.authorization = $root.google.cloud.gkemulticloud.v1.AzureAuthorization.toObject(message.authorization, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AzureCluster.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AzureCluster.State[message.state] : message.state; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - object.reconciling = message.reconciling; - 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; + object.version = ""; + object.subnetId = ""; + object.vmSize = ""; + object.rootVolume = null; + object.mainVolume = null; + object.databaseEncryption = null; + object.sshConfig = null; + object.proxyConfig = null; + object.configEncryption = null; + object.endpointSubnetId = ""; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.subnetId != null && message.hasOwnProperty("subnetId")) + object.subnetId = message.subnetId; + if (message.vmSize != null && message.hasOwnProperty("vmSize")) + object.vmSize = message.vmSize; + if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) + object.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.toObject(message.rootVolume, options); + if (message.mainVolume != null && message.hasOwnProperty("mainVolume")) + object.mainVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.toObject(message.mainVolume, options); var keys2; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; + if (message.tags && (keys2 = Object.keys(message.tags)).length) { + object.tags = {}; for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; + object.tags[keys2[j]] = message.tags[keys2[j]]; } - if (message.azureClient != null && message.hasOwnProperty("azureClient")) - object.azureClient = message.azureClient; - if (message.resourceGroupId != null && message.hasOwnProperty("resourceGroupId")) - object.resourceGroupId = message.resourceGroupId; - if (message.workloadIdentityConfig != null && message.hasOwnProperty("workloadIdentityConfig")) - object.workloadIdentityConfig = $root.google.cloud.gkemulticloud.v1.WorkloadIdentityConfig.toObject(message.workloadIdentityConfig, options); - if (message.clusterCaCertificate != null && message.hasOwnProperty("clusterCaCertificate")) - object.clusterCaCertificate = message.clusterCaCertificate; - if (message.fleet != null && message.hasOwnProperty("fleet")) - object.fleet = $root.google.cloud.gkemulticloud.v1.Fleet.toObject(message.fleet, options); - if (message.managedResources != null && message.hasOwnProperty("managedResources")) - object.managedResources = $root.google.cloud.gkemulticloud.v1.AzureClusterResources.toObject(message.managedResources, options); - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.cloud.gkemulticloud.v1.LoggingConfig.toObject(message.loggingConfig, options); + if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) + object.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.toObject(message.databaseEncryption, options); + if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) + object.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.toObject(message.sshConfig, options); + if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) + object.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.toObject(message.proxyConfig, options); + if (message.replicaPlacements && message.replicaPlacements.length) { + object.replicaPlacements = []; + for (var j = 0; j < message.replicaPlacements.length; ++j) + object.replicaPlacements[j] = $root.google.cloud.gkemulticloud.v1.ReplicaPlacement.toObject(message.replicaPlacements[j], options); + } + if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) + object.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.toObject(message.configEncryption, options); + if (message.endpointSubnetId != null && message.hasOwnProperty("endpointSubnetId")) + object.endpointSubnetId = message.endpointSubnetId; return object; }; /** - * Converts this AzureCluster to JSON. + * Converts this AzureControlPlane to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @instance * @returns {Object.} JSON object */ - AzureCluster.prototype.toJSON = function toJSON() { + AzureControlPlane.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureCluster + * Gets the default type url for AzureControlPlane * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureCluster + * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureControlPlane.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureCluster"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureControlPlane"; }; - /** - * State enum. - * @name google.cloud.gkemulticloud.v1.AzureCluster.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PROVISIONING=1 PROVISIONING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} RECONCILING=3 RECONCILING value - * @property {number} STOPPING=4 STOPPING value - * @property {number} ERROR=5 ERROR value - * @property {number} DEGRADED=6 DEGRADED value - */ - AzureCluster.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROVISIONING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "RECONCILING"] = 3; - values[valuesById[4] = "STOPPING"] = 4; - values[valuesById[5] = "ERROR"] = 5; - values[valuesById[6] = "DEGRADED"] = 6; - return values; - })(); - - return AzureCluster; + return AzureControlPlane; })(); - v1.AzureClusterNetworking = (function() { + v1.ReplicaPlacement = (function() { /** - * Properties of an AzureClusterNetworking. + * Properties of a ReplicaPlacement. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureClusterNetworking - * @property {string|null} [virtualNetworkId] AzureClusterNetworking virtualNetworkId - * @property {Array.|null} [podAddressCidrBlocks] AzureClusterNetworking podAddressCidrBlocks - * @property {Array.|null} [serviceAddressCidrBlocks] AzureClusterNetworking serviceAddressCidrBlocks - * @property {string|null} [serviceLoadBalancerSubnetId] AzureClusterNetworking serviceLoadBalancerSubnetId + * @interface IReplicaPlacement + * @property {string|null} [subnetId] ReplicaPlacement subnetId + * @property {string|null} [azureAvailabilityZone] ReplicaPlacement azureAvailabilityZone */ /** - * Constructs a new AzureClusterNetworking. + * Constructs a new ReplicaPlacement. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureClusterNetworking. - * @implements IAzureClusterNetworking + * @classdesc Represents a ReplicaPlacement. + * @implements IReplicaPlacement * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureClusterNetworking=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IReplicaPlacement=} [properties] Properties to set */ - function AzureClusterNetworking(properties) { - this.podAddressCidrBlocks = []; - this.serviceAddressCidrBlocks = []; + function ReplicaPlacement(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12381,123 +19464,89 @@ } /** - * AzureClusterNetworking virtualNetworkId. - * @member {string} virtualNetworkId - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking - * @instance - */ - AzureClusterNetworking.prototype.virtualNetworkId = ""; - - /** - * AzureClusterNetworking podAddressCidrBlocks. - * @member {Array.} podAddressCidrBlocks - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking - * @instance - */ - AzureClusterNetworking.prototype.podAddressCidrBlocks = $util.emptyArray; - - /** - * AzureClusterNetworking serviceAddressCidrBlocks. - * @member {Array.} serviceAddressCidrBlocks - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * ReplicaPlacement subnetId. + * @member {string} subnetId + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @instance */ - AzureClusterNetworking.prototype.serviceAddressCidrBlocks = $util.emptyArray; + ReplicaPlacement.prototype.subnetId = ""; /** - * AzureClusterNetworking serviceLoadBalancerSubnetId. - * @member {string} serviceLoadBalancerSubnetId - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * ReplicaPlacement azureAvailabilityZone. + * @member {string} azureAvailabilityZone + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @instance */ - AzureClusterNetworking.prototype.serviceLoadBalancerSubnetId = ""; + ReplicaPlacement.prototype.azureAvailabilityZone = ""; /** - * Creates a new AzureClusterNetworking instance using the specified properties. + * Creates a new ReplicaPlacement instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterNetworking=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureClusterNetworking} AzureClusterNetworking instance + * @param {google.cloud.gkemulticloud.v1.IReplicaPlacement=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.ReplicaPlacement} ReplicaPlacement instance */ - AzureClusterNetworking.create = function create(properties) { - return new AzureClusterNetworking(properties); + ReplicaPlacement.create = function create(properties) { + return new ReplicaPlacement(properties); }; /** - * Encodes the specified AzureClusterNetworking message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterNetworking.verify|verify} messages. + * Encodes the specified ReplicaPlacement message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ReplicaPlacement.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterNetworking} message AzureClusterNetworking message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IReplicaPlacement} message ReplicaPlacement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureClusterNetworking.encode = function encode(message, writer) { + ReplicaPlacement.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.virtualNetworkId != null && Object.hasOwnProperty.call(message, "virtualNetworkId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.virtualNetworkId); - if (message.podAddressCidrBlocks != null && message.podAddressCidrBlocks.length) - for (var i = 0; i < message.podAddressCidrBlocks.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.podAddressCidrBlocks[i]); - if (message.serviceAddressCidrBlocks != null && message.serviceAddressCidrBlocks.length) - for (var i = 0; i < message.serviceAddressCidrBlocks.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAddressCidrBlocks[i]); - if (message.serviceLoadBalancerSubnetId != null && Object.hasOwnProperty.call(message, "serviceLoadBalancerSubnetId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceLoadBalancerSubnetId); + if (message.subnetId != null && Object.hasOwnProperty.call(message, "subnetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetId); + if (message.azureAvailabilityZone != null && Object.hasOwnProperty.call(message, "azureAvailabilityZone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.azureAvailabilityZone); return writer; }; /** - * Encodes the specified AzureClusterNetworking message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterNetworking.verify|verify} messages. + * Encodes the specified ReplicaPlacement message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ReplicaPlacement.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterNetworking} message AzureClusterNetworking message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IReplicaPlacement} message ReplicaPlacement message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureClusterNetworking.encodeDelimited = function encodeDelimited(message, writer) { + ReplicaPlacement.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureClusterNetworking message from the specified reader or buffer. + * Decodes a ReplicaPlacement message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureClusterNetworking} AzureClusterNetworking + * @returns {google.cloud.gkemulticloud.v1.ReplicaPlacement} ReplicaPlacement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureClusterNetworking.decode = function decode(reader, length) { + ReplicaPlacement.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ReplicaPlacement(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.virtualNetworkId = reader.string(); + message.subnetId = reader.string(); break; } case 2: { - if (!(message.podAddressCidrBlocks && message.podAddressCidrBlocks.length)) - message.podAddressCidrBlocks = []; - message.podAddressCidrBlocks.push(reader.string()); - break; - } - case 3: { - if (!(message.serviceAddressCidrBlocks && message.serviceAddressCidrBlocks.length)) - message.serviceAddressCidrBlocks = []; - message.serviceAddressCidrBlocks.push(reader.string()); - break; - } - case 5: { - message.serviceLoadBalancerSubnetId = reader.string(); + message.azureAvailabilityZone = reader.string(); break; } default: @@ -12509,186 +19558,132 @@ }; /** - * Decodes an AzureClusterNetworking message from the specified reader or buffer, length delimited. + * Decodes a ReplicaPlacement message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureClusterNetworking} AzureClusterNetworking + * @returns {google.cloud.gkemulticloud.v1.ReplicaPlacement} ReplicaPlacement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AzureClusterNetworking.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AzureClusterNetworking message. - * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AzureClusterNetworking.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.virtualNetworkId != null && message.hasOwnProperty("virtualNetworkId")) - if (!$util.isString(message.virtualNetworkId)) - return "virtualNetworkId: string expected"; - if (message.podAddressCidrBlocks != null && message.hasOwnProperty("podAddressCidrBlocks")) { - if (!Array.isArray(message.podAddressCidrBlocks)) - return "podAddressCidrBlocks: array expected"; - for (var i = 0; i < message.podAddressCidrBlocks.length; ++i) - if (!$util.isString(message.podAddressCidrBlocks[i])) - return "podAddressCidrBlocks: string[] expected"; - } - if (message.serviceAddressCidrBlocks != null && message.hasOwnProperty("serviceAddressCidrBlocks")) { - if (!Array.isArray(message.serviceAddressCidrBlocks)) - return "serviceAddressCidrBlocks: array expected"; - for (var i = 0; i < message.serviceAddressCidrBlocks.length; ++i) - if (!$util.isString(message.serviceAddressCidrBlocks[i])) - return "serviceAddressCidrBlocks: string[] expected"; - } - if (message.serviceLoadBalancerSubnetId != null && message.hasOwnProperty("serviceLoadBalancerSubnetId")) - if (!$util.isString(message.serviceLoadBalancerSubnetId)) - return "serviceLoadBalancerSubnetId: string expected"; + */ + ReplicaPlacement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplicaPlacement message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplicaPlacement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subnetId != null && message.hasOwnProperty("subnetId")) + if (!$util.isString(message.subnetId)) + return "subnetId: string expected"; + if (message.azureAvailabilityZone != null && message.hasOwnProperty("azureAvailabilityZone")) + if (!$util.isString(message.azureAvailabilityZone)) + return "azureAvailabilityZone: string expected"; return null; }; /** - * Creates an AzureClusterNetworking message from a plain object. Also converts values to their respective internal types. + * Creates a ReplicaPlacement message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureClusterNetworking} AzureClusterNetworking + * @returns {google.cloud.gkemulticloud.v1.ReplicaPlacement} ReplicaPlacement */ - AzureClusterNetworking.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking) + ReplicaPlacement.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.ReplicaPlacement) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureClusterNetworking(); - if (object.virtualNetworkId != null) - message.virtualNetworkId = String(object.virtualNetworkId); - if (object.podAddressCidrBlocks) { - if (!Array.isArray(object.podAddressCidrBlocks)) - throw TypeError(".google.cloud.gkemulticloud.v1.AzureClusterNetworking.podAddressCidrBlocks: array expected"); - message.podAddressCidrBlocks = []; - for (var i = 0; i < object.podAddressCidrBlocks.length; ++i) - message.podAddressCidrBlocks[i] = String(object.podAddressCidrBlocks[i]); - } - if (object.serviceAddressCidrBlocks) { - if (!Array.isArray(object.serviceAddressCidrBlocks)) - throw TypeError(".google.cloud.gkemulticloud.v1.AzureClusterNetworking.serviceAddressCidrBlocks: array expected"); - message.serviceAddressCidrBlocks = []; - for (var i = 0; i < object.serviceAddressCidrBlocks.length; ++i) - message.serviceAddressCidrBlocks[i] = String(object.serviceAddressCidrBlocks[i]); - } - if (object.serviceLoadBalancerSubnetId != null) - message.serviceLoadBalancerSubnetId = String(object.serviceLoadBalancerSubnetId); + var message = new $root.google.cloud.gkemulticloud.v1.ReplicaPlacement(); + if (object.subnetId != null) + message.subnetId = String(object.subnetId); + if (object.azureAvailabilityZone != null) + message.azureAvailabilityZone = String(object.azureAvailabilityZone); return message; }; /** - * Creates a plain object from an AzureClusterNetworking message. Also converts values to other types if specified. + * Creates a plain object from a ReplicaPlacement message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @static - * @param {google.cloud.gkemulticloud.v1.AzureClusterNetworking} message AzureClusterNetworking + * @param {google.cloud.gkemulticloud.v1.ReplicaPlacement} message ReplicaPlacement * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureClusterNetworking.toObject = function toObject(message, options) { + ReplicaPlacement.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.podAddressCidrBlocks = []; - object.serviceAddressCidrBlocks = []; - } if (options.defaults) { - object.virtualNetworkId = ""; - object.serviceLoadBalancerSubnetId = ""; - } - if (message.virtualNetworkId != null && message.hasOwnProperty("virtualNetworkId")) - object.virtualNetworkId = message.virtualNetworkId; - if (message.podAddressCidrBlocks && message.podAddressCidrBlocks.length) { - object.podAddressCidrBlocks = []; - for (var j = 0; j < message.podAddressCidrBlocks.length; ++j) - object.podAddressCidrBlocks[j] = message.podAddressCidrBlocks[j]; - } - if (message.serviceAddressCidrBlocks && message.serviceAddressCidrBlocks.length) { - object.serviceAddressCidrBlocks = []; - for (var j = 0; j < message.serviceAddressCidrBlocks.length; ++j) - object.serviceAddressCidrBlocks[j] = message.serviceAddressCidrBlocks[j]; + object.subnetId = ""; + object.azureAvailabilityZone = ""; } - if (message.serviceLoadBalancerSubnetId != null && message.hasOwnProperty("serviceLoadBalancerSubnetId")) - object.serviceLoadBalancerSubnetId = message.serviceLoadBalancerSubnetId; + if (message.subnetId != null && message.hasOwnProperty("subnetId")) + object.subnetId = message.subnetId; + if (message.azureAvailabilityZone != null && message.hasOwnProperty("azureAvailabilityZone")) + object.azureAvailabilityZone = message.azureAvailabilityZone; return object; }; /** - * Converts this AzureClusterNetworking to JSON. + * Converts this ReplicaPlacement to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @instance * @returns {Object.} JSON object */ - AzureClusterNetworking.prototype.toJSON = function toJSON() { + ReplicaPlacement.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureClusterNetworking + * Gets the default type url for ReplicaPlacement * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureClusterNetworking + * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureClusterNetworking.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReplicaPlacement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClusterNetworking"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ReplicaPlacement"; }; - return AzureClusterNetworking; + return ReplicaPlacement; })(); - v1.AzureControlPlane = (function() { + v1.AzureProxyConfig = (function() { /** - * Properties of an AzureControlPlane. + * Properties of an AzureProxyConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureControlPlane - * @property {string|null} [version] AzureControlPlane version - * @property {string|null} [subnetId] AzureControlPlane subnetId - * @property {string|null} [vmSize] AzureControlPlane vmSize - * @property {google.cloud.gkemulticloud.v1.IAzureSshConfig|null} [sshConfig] AzureControlPlane sshConfig - * @property {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null} [rootVolume] AzureControlPlane rootVolume - * @property {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null} [mainVolume] AzureControlPlane mainVolume - * @property {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption|null} [databaseEncryption] AzureControlPlane databaseEncryption - * @property {google.cloud.gkemulticloud.v1.IAzureProxyConfig|null} [proxyConfig] AzureControlPlane proxyConfig - * @property {google.cloud.gkemulticloud.v1.IAzureConfigEncryption|null} [configEncryption] AzureControlPlane configEncryption - * @property {Object.|null} [tags] AzureControlPlane tags - * @property {Array.|null} [replicaPlacements] AzureControlPlane replicaPlacements - * @property {string|null} [endpointSubnetId] AzureControlPlane endpointSubnetId + * @interface IAzureProxyConfig + * @property {string|null} [resourceGroupId] AzureProxyConfig resourceGroupId + * @property {string|null} [secretId] AzureProxyConfig secretId */ /** - * Constructs a new AzureControlPlane. + * Constructs a new AzureProxyConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureControlPlane. - * @implements IAzureControlPlane + * @classdesc Represents an AzureProxyConfig. + * @implements IAzureProxyConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureControlPlane=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureProxyConfig=} [properties] Properties to set */ - function AzureControlPlane(properties) { - this.tags = {}; - this.replicaPlacements = []; + function AzureProxyConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12696,252 +19691,89 @@ } /** - * AzureControlPlane version. - * @member {string} version - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.version = ""; - - /** - * AzureControlPlane subnetId. - * @member {string} subnetId - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.subnetId = ""; - - /** - * AzureControlPlane vmSize. - * @member {string} vmSize - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.vmSize = ""; - - /** - * AzureControlPlane sshConfig. - * @member {google.cloud.gkemulticloud.v1.IAzureSshConfig|null|undefined} sshConfig - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.sshConfig = null; - - /** - * AzureControlPlane rootVolume. - * @member {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null|undefined} rootVolume - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.rootVolume = null; - - /** - * AzureControlPlane mainVolume. - * @member {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null|undefined} mainVolume - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.mainVolume = null; - - /** - * AzureControlPlane databaseEncryption. - * @member {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption|null|undefined} databaseEncryption - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.databaseEncryption = null; - - /** - * AzureControlPlane proxyConfig. - * @member {google.cloud.gkemulticloud.v1.IAzureProxyConfig|null|undefined} proxyConfig - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.proxyConfig = null; - - /** - * AzureControlPlane configEncryption. - * @member {google.cloud.gkemulticloud.v1.IAzureConfigEncryption|null|undefined} configEncryption - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.configEncryption = null; - - /** - * AzureControlPlane tags. - * @member {Object.} tags - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @instance - */ - AzureControlPlane.prototype.tags = $util.emptyObject; - - /** - * AzureControlPlane replicaPlacements. - * @member {Array.} replicaPlacements - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * AzureProxyConfig resourceGroupId. + * @member {string} resourceGroupId + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @instance */ - AzureControlPlane.prototype.replicaPlacements = $util.emptyArray; + AzureProxyConfig.prototype.resourceGroupId = ""; /** - * AzureControlPlane endpointSubnetId. - * @member {string} endpointSubnetId - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * AzureProxyConfig secretId. + * @member {string} secretId + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @instance */ - AzureControlPlane.prototype.endpointSubnetId = ""; + AzureProxyConfig.prototype.secretId = ""; /** - * Creates a new AzureControlPlane instance using the specified properties. + * Creates a new AzureProxyConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureControlPlane=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureControlPlane} AzureControlPlane instance + * @param {google.cloud.gkemulticloud.v1.IAzureProxyConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureProxyConfig} AzureProxyConfig instance */ - AzureControlPlane.create = function create(properties) { - return new AzureControlPlane(properties); + AzureProxyConfig.create = function create(properties) { + return new AzureProxyConfig(properties); }; /** - * Encodes the specified AzureControlPlane message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureControlPlane.verify|verify} messages. + * Encodes the specified AzureProxyConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureProxyConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureControlPlane} message AzureControlPlane message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureProxyConfig} message AzureProxyConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureControlPlane.encode = function encode(message, writer) { + AzureProxyConfig.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.subnetId != null && Object.hasOwnProperty.call(message, "subnetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetId); - if (message.vmSize != null && Object.hasOwnProperty.call(message, "vmSize")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.vmSize); - if (message.rootVolume != null && Object.hasOwnProperty.call(message, "rootVolume")) - $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.encode(message.rootVolume, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.mainVolume != null && Object.hasOwnProperty.call(message, "mainVolume")) - $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.encode(message.mainVolume, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - for (var keys = Object.keys(message.tags), 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.tags[keys[i]]).ldelim(); - if (message.databaseEncryption != null && Object.hasOwnProperty.call(message, "databaseEncryption")) - $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.encode(message.databaseEncryption, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.sshConfig != null && Object.hasOwnProperty.call(message, "sshConfig")) - $root.google.cloud.gkemulticloud.v1.AzureSshConfig.encode(message.sshConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.proxyConfig != null && Object.hasOwnProperty.call(message, "proxyConfig")) - $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.encode(message.proxyConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.replicaPlacements != null && message.replicaPlacements.length) - for (var i = 0; i < message.replicaPlacements.length; ++i) - $root.google.cloud.gkemulticloud.v1.ReplicaPlacement.encode(message.replicaPlacements[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.configEncryption != null && Object.hasOwnProperty.call(message, "configEncryption")) - $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.encode(message.configEncryption, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.endpointSubnetId != null && Object.hasOwnProperty.call(message, "endpointSubnetId")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.endpointSubnetId); + if (message.resourceGroupId != null && Object.hasOwnProperty.call(message, "resourceGroupId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceGroupId); + if (message.secretId != null && Object.hasOwnProperty.call(message, "secretId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.secretId); return writer; }; /** - * Encodes the specified AzureControlPlane message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureControlPlane.verify|verify} messages. + * Encodes the specified AzureProxyConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureProxyConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureControlPlane} message AzureControlPlane message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureProxyConfig} message AzureProxyConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureControlPlane.encodeDelimited = function encodeDelimited(message, writer) { + AzureProxyConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureControlPlane message from the specified reader or buffer. + * Decodes an AzureProxyConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureControlPlane} AzureControlPlane + * @returns {google.cloud.gkemulticloud.v1.AzureProxyConfig} AzureProxyConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureControlPlane.decode = function decode(reader, length) { + AzureProxyConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureControlPlane(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureProxyConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); + message.resourceGroupId = reader.string(); break; } case 2: { - message.subnetId = reader.string(); - break; - } - case 3: { - message.vmSize = reader.string(); - break; - } - case 11: { - message.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.decode(reader, reader.uint32()); - break; - } - case 5: { - message.mainVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.decode(reader, reader.uint32()); - break; - } - case 10: { - message.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.decode(reader, reader.uint32()); - break; - } - case 12: { - message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.decode(reader, reader.uint32()); - break; - } - case 14: { - message.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.decode(reader, reader.uint32()); - break; - } - case 7: { - if (message.tags === $util.emptyObject) - message.tags = {}; - 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.tags[key] = value; - break; - } - case 13: { - if (!(message.replicaPlacements && message.replicaPlacements.length)) - message.replicaPlacements = []; - message.replicaPlacements.push($root.google.cloud.gkemulticloud.v1.ReplicaPlacement.decode(reader, reader.uint32())); - break; - } - case 15: { - message.endpointSubnetId = reader.string(); + message.secretId = reader.string(); break; } default: @@ -12953,275 +19785,131 @@ }; /** - * Decodes an AzureControlPlane message from the specified reader or buffer, length delimited. + * Decodes an AzureProxyConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureControlPlane} AzureControlPlane + * @returns {google.cloud.gkemulticloud.v1.AzureProxyConfig} AzureProxyConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureControlPlane.decodeDelimited = function decodeDelimited(reader) { + AzureProxyConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureControlPlane message. + * Verifies an AzureProxyConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureControlPlane.verify = function verify(message) { + AzureProxyConfig.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.subnetId != null && message.hasOwnProperty("subnetId")) - if (!$util.isString(message.subnetId)) - return "subnetId: string expected"; - if (message.vmSize != null && message.hasOwnProperty("vmSize")) - if (!$util.isString(message.vmSize)) - return "vmSize: string expected"; - if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.verify(message.sshConfig); - if (error) - return "sshConfig." + error; - } - if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify(message.rootVolume); - if (error) - return "rootVolume." + error; - } - if (message.mainVolume != null && message.hasOwnProperty("mainVolume")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify(message.mainVolume); - if (error) - return "mainVolume." + error; - } - if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.verify(message.databaseEncryption); - if (error) - return "databaseEncryption." + error; - } - if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.verify(message.proxyConfig); - if (error) - return "proxyConfig." + error; - } - if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.verify(message.configEncryption); - if (error) - return "configEncryption." + error; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!$util.isObject(message.tags)) - return "tags: object expected"; - var key = Object.keys(message.tags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) - return "tags: string{k:string} expected"; - } - if (message.replicaPlacements != null && message.hasOwnProperty("replicaPlacements")) { - if (!Array.isArray(message.replicaPlacements)) - return "replicaPlacements: array expected"; - for (var i = 0; i < message.replicaPlacements.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.ReplicaPlacement.verify(message.replicaPlacements[i]); - if (error) - return "replicaPlacements." + error; - } - } - if (message.endpointSubnetId != null && message.hasOwnProperty("endpointSubnetId")) - if (!$util.isString(message.endpointSubnetId)) - return "endpointSubnetId: string expected"; - return null; - }; - - /** - * Creates an AzureControlPlane message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureControlPlane} AzureControlPlane - */ - AzureControlPlane.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureControlPlane) - return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureControlPlane(); - if (object.version != null) - message.version = String(object.version); - if (object.subnetId != null) - message.subnetId = String(object.subnetId); - if (object.vmSize != null) - message.vmSize = String(object.vmSize); - if (object.sshConfig != null) { - if (typeof object.sshConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.sshConfig: object expected"); - message.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.fromObject(object.sshConfig); - } - if (object.rootVolume != null) { - if (typeof object.rootVolume !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.rootVolume: object expected"); - message.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.fromObject(object.rootVolume); - } - if (object.mainVolume != null) { - if (typeof object.mainVolume !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.mainVolume: object expected"); - message.mainVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.fromObject(object.mainVolume); - } - if (object.databaseEncryption != null) { - if (typeof object.databaseEncryption !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.databaseEncryption: object expected"); - message.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.fromObject(object.databaseEncryption); - } - if (object.proxyConfig != null) { - if (typeof object.proxyConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.proxyConfig: object expected"); - message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.fromObject(object.proxyConfig); - } - if (object.configEncryption != null) { - if (typeof object.configEncryption !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.configEncryption: object expected"); - message.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.fromObject(object.configEncryption); - } - if (object.tags) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.tags: object expected"); - message.tags = {}; - for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) - message.tags[keys[i]] = String(object.tags[keys[i]]); - } - if (object.replicaPlacements) { - if (!Array.isArray(object.replicaPlacements)) - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.replicaPlacements: array expected"); - message.replicaPlacements = []; - for (var i = 0; i < object.replicaPlacements.length; ++i) { - if (typeof object.replicaPlacements[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureControlPlane.replicaPlacements: object expected"); - message.replicaPlacements[i] = $root.google.cloud.gkemulticloud.v1.ReplicaPlacement.fromObject(object.replicaPlacements[i]); - } - } - if (object.endpointSubnetId != null) - message.endpointSubnetId = String(object.endpointSubnetId); + if (message.resourceGroupId != null && message.hasOwnProperty("resourceGroupId")) + if (!$util.isString(message.resourceGroupId)) + return "resourceGroupId: string expected"; + if (message.secretId != null && message.hasOwnProperty("secretId")) + if (!$util.isString(message.secretId)) + return "secretId: string expected"; + return null; + }; + + /** + * Creates an AzureProxyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AzureProxyConfig} AzureProxyConfig + */ + AzureProxyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureProxyConfig) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AzureProxyConfig(); + if (object.resourceGroupId != null) + message.resourceGroupId = String(object.resourceGroupId); + if (object.secretId != null) + message.secretId = String(object.secretId); return message; }; /** - * Creates a plain object from an AzureControlPlane message. Also converts values to other types if specified. + * Creates a plain object from an AzureProxyConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @static - * @param {google.cloud.gkemulticloud.v1.AzureControlPlane} message AzureControlPlane + * @param {google.cloud.gkemulticloud.v1.AzureProxyConfig} message AzureProxyConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureControlPlane.toObject = function toObject(message, options) { + AzureProxyConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.replicaPlacements = []; - if (options.objects || options.defaults) - object.tags = {}; if (options.defaults) { - object.version = ""; - object.subnetId = ""; - object.vmSize = ""; - object.rootVolume = null; - object.mainVolume = null; - object.databaseEncryption = null; - object.sshConfig = null; - object.proxyConfig = null; - object.configEncryption = null; - object.endpointSubnetId = ""; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.subnetId != null && message.hasOwnProperty("subnetId")) - object.subnetId = message.subnetId; - if (message.vmSize != null && message.hasOwnProperty("vmSize")) - object.vmSize = message.vmSize; - if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) - object.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.toObject(message.rootVolume, options); - if (message.mainVolume != null && message.hasOwnProperty("mainVolume")) - object.mainVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.toObject(message.mainVolume, options); - var keys2; - if (message.tags && (keys2 = Object.keys(message.tags)).length) { - object.tags = {}; - for (var j = 0; j < keys2.length; ++j) - object.tags[keys2[j]] = message.tags[keys2[j]]; - } - if (message.databaseEncryption != null && message.hasOwnProperty("databaseEncryption")) - object.databaseEncryption = $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.toObject(message.databaseEncryption, options); - if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) - object.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.toObject(message.sshConfig, options); - if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) - object.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.toObject(message.proxyConfig, options); - if (message.replicaPlacements && message.replicaPlacements.length) { - object.replicaPlacements = []; - for (var j = 0; j < message.replicaPlacements.length; ++j) - object.replicaPlacements[j] = $root.google.cloud.gkemulticloud.v1.ReplicaPlacement.toObject(message.replicaPlacements[j], options); + object.resourceGroupId = ""; + object.secretId = ""; } - if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) - object.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.toObject(message.configEncryption, options); - if (message.endpointSubnetId != null && message.hasOwnProperty("endpointSubnetId")) - object.endpointSubnetId = message.endpointSubnetId; + if (message.resourceGroupId != null && message.hasOwnProperty("resourceGroupId")) + object.resourceGroupId = message.resourceGroupId; + if (message.secretId != null && message.hasOwnProperty("secretId")) + object.secretId = message.secretId; return object; }; /** - * Converts this AzureControlPlane to JSON. + * Converts this AzureProxyConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @instance * @returns {Object.} JSON object */ - AzureControlPlane.prototype.toJSON = function toJSON() { + AzureProxyConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureControlPlane + * Gets the default type url for AzureProxyConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureControlPlane + * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureControlPlane.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureProxyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureControlPlane"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureProxyConfig"; }; - return AzureControlPlane; + return AzureProxyConfig; })(); - v1.ReplicaPlacement = (function() { + v1.AzureDatabaseEncryption = (function() { /** - * Properties of a ReplicaPlacement. + * Properties of an AzureDatabaseEncryption. * @memberof google.cloud.gkemulticloud.v1 - * @interface IReplicaPlacement - * @property {string|null} [subnetId] ReplicaPlacement subnetId - * @property {string|null} [azureAvailabilityZone] ReplicaPlacement azureAvailabilityZone + * @interface IAzureDatabaseEncryption + * @property {string|null} [keyId] AzureDatabaseEncryption keyId */ /** - * Constructs a new ReplicaPlacement. + * Constructs a new AzureDatabaseEncryption. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents a ReplicaPlacement. - * @implements IReplicaPlacement + * @classdesc Represents an AzureDatabaseEncryption. + * @implements IAzureDatabaseEncryption * @constructor - * @param {google.cloud.gkemulticloud.v1.IReplicaPlacement=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption=} [properties] Properties to set */ - function ReplicaPlacement(properties) { + function AzureDatabaseEncryption(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13229,89 +19917,75 @@ } /** - * ReplicaPlacement subnetId. - * @member {string} subnetId - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement - * @instance - */ - ReplicaPlacement.prototype.subnetId = ""; - - /** - * ReplicaPlacement azureAvailabilityZone. - * @member {string} azureAvailabilityZone - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * AzureDatabaseEncryption keyId. + * @member {string} keyId + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @instance */ - ReplicaPlacement.prototype.azureAvailabilityZone = ""; + AzureDatabaseEncryption.prototype.keyId = ""; /** - * Creates a new ReplicaPlacement instance using the specified properties. + * Creates a new AzureDatabaseEncryption instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IReplicaPlacement=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.ReplicaPlacement} ReplicaPlacement instance + * @param {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} AzureDatabaseEncryption instance */ - ReplicaPlacement.create = function create(properties) { - return new ReplicaPlacement(properties); + AzureDatabaseEncryption.create = function create(properties) { + return new AzureDatabaseEncryption(properties); }; /** - * Encodes the specified ReplicaPlacement message. Does not implicitly {@link google.cloud.gkemulticloud.v1.ReplicaPlacement.verify|verify} messages. + * Encodes the specified AzureDatabaseEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IReplicaPlacement} message ReplicaPlacement message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption} message AzureDatabaseEncryption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplicaPlacement.encode = function encode(message, writer) { + AzureDatabaseEncryption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.subnetId != null && Object.hasOwnProperty.call(message, "subnetId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetId); - if (message.azureAvailabilityZone != null && Object.hasOwnProperty.call(message, "azureAvailabilityZone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.azureAvailabilityZone); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyId); return writer; }; /** - * Encodes the specified ReplicaPlacement message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.ReplicaPlacement.verify|verify} messages. + * Encodes the specified AzureDatabaseEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IReplicaPlacement} message ReplicaPlacement message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption} message AzureDatabaseEncryption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReplicaPlacement.encodeDelimited = function encodeDelimited(message, writer) { + AzureDatabaseEncryption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReplicaPlacement message from the specified reader or buffer. + * Decodes an AzureDatabaseEncryption message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.ReplicaPlacement} ReplicaPlacement + * @returns {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} AzureDatabaseEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplicaPlacement.decode = function decode(reader, length) { + AzureDatabaseEncryption.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.ReplicaPlacement(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.subnetId = reader.string(); - break; - } - case 2: { - message.azureAvailabilityZone = reader.string(); + case 3: { + message.keyId = reader.string(); break; } default: @@ -13323,132 +19997,123 @@ }; /** - * Decodes a ReplicaPlacement message from the specified reader or buffer, length delimited. + * Decodes an AzureDatabaseEncryption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.ReplicaPlacement} ReplicaPlacement + * @returns {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} AzureDatabaseEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReplicaPlacement.decodeDelimited = function decodeDelimited(reader) { + AzureDatabaseEncryption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReplicaPlacement message. + * Verifies an AzureDatabaseEncryption message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReplicaPlacement.verify = function verify(message) { + AzureDatabaseEncryption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.subnetId != null && message.hasOwnProperty("subnetId")) - if (!$util.isString(message.subnetId)) - return "subnetId: string expected"; - if (message.azureAvailabilityZone != null && message.hasOwnProperty("azureAvailabilityZone")) - if (!$util.isString(message.azureAvailabilityZone)) - return "azureAvailabilityZone: string expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) + if (!$util.isString(message.keyId)) + return "keyId: string expected"; return null; }; /** - * Creates a ReplicaPlacement message from a plain object. Also converts values to their respective internal types. + * Creates an AzureDatabaseEncryption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.ReplicaPlacement} ReplicaPlacement + * @returns {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} AzureDatabaseEncryption */ - ReplicaPlacement.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.ReplicaPlacement) + AzureDatabaseEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) return object; - var message = new $root.google.cloud.gkemulticloud.v1.ReplicaPlacement(); - if (object.subnetId != null) - message.subnetId = String(object.subnetId); - if (object.azureAvailabilityZone != null) - message.azureAvailabilityZone = String(object.azureAvailabilityZone); + var message = new $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption(); + if (object.keyId != null) + message.keyId = String(object.keyId); return message; }; /** - * Creates a plain object from a ReplicaPlacement message. Also converts values to other types if specified. + * Creates a plain object from an AzureDatabaseEncryption message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static - * @param {google.cloud.gkemulticloud.v1.ReplicaPlacement} message ReplicaPlacement + * @param {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} message AzureDatabaseEncryption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReplicaPlacement.toObject = function toObject(message, options) { + AzureDatabaseEncryption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.subnetId = ""; - object.azureAvailabilityZone = ""; - } - if (message.subnetId != null && message.hasOwnProperty("subnetId")) - object.subnetId = message.subnetId; - if (message.azureAvailabilityZone != null && message.hasOwnProperty("azureAvailabilityZone")) - object.azureAvailabilityZone = message.azureAvailabilityZone; + if (options.defaults) + object.keyId = ""; + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = message.keyId; return object; }; /** - * Converts this ReplicaPlacement to JSON. + * Converts this AzureDatabaseEncryption to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @instance * @returns {Object.} JSON object */ - ReplicaPlacement.prototype.toJSON = function toJSON() { + AzureDatabaseEncryption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReplicaPlacement + * Gets the default type url for AzureDatabaseEncryption * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.ReplicaPlacement + * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReplicaPlacement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureDatabaseEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.ReplicaPlacement"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureDatabaseEncryption"; }; - return ReplicaPlacement; + return AzureDatabaseEncryption; })(); - v1.AzureProxyConfig = (function() { + v1.AzureConfigEncryption = (function() { /** - * Properties of an AzureProxyConfig. + * Properties of an AzureConfigEncryption. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureProxyConfig - * @property {string|null} [resourceGroupId] AzureProxyConfig resourceGroupId - * @property {string|null} [secretId] AzureProxyConfig secretId + * @interface IAzureConfigEncryption + * @property {string|null} [keyId] AzureConfigEncryption keyId + * @property {string|null} [publicKey] AzureConfigEncryption publicKey */ /** - * Constructs a new AzureProxyConfig. + * Constructs a new AzureConfigEncryption. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureProxyConfig. - * @implements IAzureProxyConfig + * @classdesc Represents an AzureConfigEncryption. + * @implements IAzureConfigEncryption * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureProxyConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureConfigEncryption=} [properties] Properties to set */ - function AzureProxyConfig(properties) { + function AzureConfigEncryption(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13456,89 +20121,89 @@ } /** - * AzureProxyConfig resourceGroupId. - * @member {string} resourceGroupId - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * AzureConfigEncryption keyId. + * @member {string} keyId + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @instance */ - AzureProxyConfig.prototype.resourceGroupId = ""; + AzureConfigEncryption.prototype.keyId = ""; /** - * AzureProxyConfig secretId. - * @member {string} secretId - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * AzureConfigEncryption publicKey. + * @member {string} publicKey + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @instance */ - AzureProxyConfig.prototype.secretId = ""; + AzureConfigEncryption.prototype.publicKey = ""; /** - * Creates a new AzureProxyConfig instance using the specified properties. + * Creates a new AzureConfigEncryption instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IAzureProxyConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureProxyConfig} AzureProxyConfig instance + * @param {google.cloud.gkemulticloud.v1.IAzureConfigEncryption=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureConfigEncryption} AzureConfigEncryption instance */ - AzureProxyConfig.create = function create(properties) { - return new AzureProxyConfig(properties); + AzureConfigEncryption.create = function create(properties) { + return new AzureConfigEncryption(properties); }; /** - * Encodes the specified AzureProxyConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureProxyConfig.verify|verify} messages. + * Encodes the specified AzureConfigEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureConfigEncryption.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IAzureProxyConfig} message AzureProxyConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureConfigEncryption} message AzureConfigEncryption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureProxyConfig.encode = function encode(message, writer) { + AzureConfigEncryption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceGroupId != null && Object.hasOwnProperty.call(message, "resourceGroupId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceGroupId); - if (message.secretId != null && Object.hasOwnProperty.call(message, "secretId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.secretId); + if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyId); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publicKey); return writer; }; /** - * Encodes the specified AzureProxyConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureProxyConfig.verify|verify} messages. + * Encodes the specified AzureConfigEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureConfigEncryption.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static - * @param {google.cloud.gkemulticloud.v1.IAzureProxyConfig} message AzureProxyConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureConfigEncryption} message AzureConfigEncryption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureProxyConfig.encodeDelimited = function encodeDelimited(message, writer) { + AzureConfigEncryption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureProxyConfig message from the specified reader or buffer. + * Decodes an AzureConfigEncryption message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureProxyConfig} AzureProxyConfig + * @returns {google.cloud.gkemulticloud.v1.AzureConfigEncryption} AzureConfigEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureProxyConfig.decode = function decode(reader, length) { + AzureConfigEncryption.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureProxyConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.resourceGroupId = reader.string(); + case 2: { + message.keyId = reader.string(); break; } - case 2: { - message.secretId = reader.string(); + case 3: { + message.publicKey = reader.string(); break; } default: @@ -13550,131 +20215,131 @@ }; /** - * Decodes an AzureProxyConfig message from the specified reader or buffer, length delimited. + * Decodes an AzureConfigEncryption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureProxyConfig} AzureProxyConfig + * @returns {google.cloud.gkemulticloud.v1.AzureConfigEncryption} AzureConfigEncryption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureProxyConfig.decodeDelimited = function decodeDelimited(reader) { + AzureConfigEncryption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureProxyConfig message. + * Verifies an AzureConfigEncryption message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureProxyConfig.verify = function verify(message) { + AzureConfigEncryption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceGroupId != null && message.hasOwnProperty("resourceGroupId")) - if (!$util.isString(message.resourceGroupId)) - return "resourceGroupId: string expected"; - if (message.secretId != null && message.hasOwnProperty("secretId")) - if (!$util.isString(message.secretId)) - return "secretId: string expected"; + if (message.keyId != null && message.hasOwnProperty("keyId")) + if (!$util.isString(message.keyId)) + return "keyId: string expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (!$util.isString(message.publicKey)) + return "publicKey: string expected"; return null; }; /** - * Creates an AzureProxyConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AzureConfigEncryption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureProxyConfig} AzureProxyConfig + * @returns {google.cloud.gkemulticloud.v1.AzureConfigEncryption} AzureConfigEncryption */ - AzureProxyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureProxyConfig) + AzureConfigEncryption.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureProxyConfig(); - if (object.resourceGroupId != null) - message.resourceGroupId = String(object.resourceGroupId); - if (object.secretId != null) - message.secretId = String(object.secretId); + var message = new $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption(); + if (object.keyId != null) + message.keyId = String(object.keyId); + if (object.publicKey != null) + message.publicKey = String(object.publicKey); return message; }; /** - * Creates a plain object from an AzureProxyConfig message. Also converts values to other types if specified. + * Creates a plain object from an AzureConfigEncryption message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static - * @param {google.cloud.gkemulticloud.v1.AzureProxyConfig} message AzureProxyConfig + * @param {google.cloud.gkemulticloud.v1.AzureConfigEncryption} message AzureConfigEncryption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureProxyConfig.toObject = function toObject(message, options) { + AzureConfigEncryption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.resourceGroupId = ""; - object.secretId = ""; + object.keyId = ""; + object.publicKey = ""; } - if (message.resourceGroupId != null && message.hasOwnProperty("resourceGroupId")) - object.resourceGroupId = message.resourceGroupId; - if (message.secretId != null && message.hasOwnProperty("secretId")) - object.secretId = message.secretId; + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = message.keyId; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = message.publicKey; return object; }; /** - * Converts this AzureProxyConfig to JSON. + * Converts this AzureConfigEncryption to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @instance * @returns {Object.} JSON object */ - AzureProxyConfig.prototype.toJSON = function toJSON() { + AzureConfigEncryption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureProxyConfig + * Gets the default type url for AzureConfigEncryption * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureProxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureProxyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureConfigEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureProxyConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureConfigEncryption"; }; - return AzureProxyConfig; + return AzureConfigEncryption; })(); - v1.AzureDatabaseEncryption = (function() { + v1.AzureDiskTemplate = (function() { /** - * Properties of an AzureDatabaseEncryption. + * Properties of an AzureDiskTemplate. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureDatabaseEncryption - * @property {string|null} [keyId] AzureDatabaseEncryption keyId + * @interface IAzureDiskTemplate + * @property {number|null} [sizeGib] AzureDiskTemplate sizeGib */ /** - * Constructs a new AzureDatabaseEncryption. + * Constructs a new AzureDiskTemplate. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureDatabaseEncryption. - * @implements IAzureDatabaseEncryption + * @classdesc Represents an AzureDiskTemplate. + * @implements IAzureDiskTemplate * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureDiskTemplate=} [properties] Properties to set */ - function AzureDatabaseEncryption(properties) { + function AzureDiskTemplate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13682,75 +20347,75 @@ } /** - * AzureDatabaseEncryption keyId. - * @member {string} keyId - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * AzureDiskTemplate sizeGib. + * @member {number} sizeGib + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @instance */ - AzureDatabaseEncryption.prototype.keyId = ""; + AzureDiskTemplate.prototype.sizeGib = 0; /** - * Creates a new AzureDatabaseEncryption instance using the specified properties. + * Creates a new AzureDiskTemplate instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static - * @param {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} AzureDatabaseEncryption instance + * @param {google.cloud.gkemulticloud.v1.IAzureDiskTemplate=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureDiskTemplate} AzureDiskTemplate instance */ - AzureDatabaseEncryption.create = function create(properties) { - return new AzureDatabaseEncryption(properties); + AzureDiskTemplate.create = function create(properties) { + return new AzureDiskTemplate(properties); }; /** - * Encodes the specified AzureDatabaseEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.verify|verify} messages. + * Encodes the specified AzureDiskTemplate message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static - * @param {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption} message AzureDatabaseEncryption message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureDiskTemplate} message AzureDiskTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureDatabaseEncryption.encode = function encode(message, writer) { + AzureDiskTemplate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.keyId); + if (message.sizeGib != null && Object.hasOwnProperty.call(message, "sizeGib")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sizeGib); return writer; }; /** - * Encodes the specified AzureDatabaseEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureDatabaseEncryption.verify|verify} messages. + * Encodes the specified AzureDiskTemplate message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static - * @param {google.cloud.gkemulticloud.v1.IAzureDatabaseEncryption} message AzureDatabaseEncryption message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureDiskTemplate} message AzureDiskTemplate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureDatabaseEncryption.encodeDelimited = function encodeDelimited(message, writer) { + AzureDiskTemplate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureDatabaseEncryption message from the specified reader or buffer. + * Decodes an AzureDiskTemplate message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} AzureDatabaseEncryption + * @returns {google.cloud.gkemulticloud.v1.AzureDiskTemplate} AzureDiskTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureDatabaseEncryption.decode = function decode(reader, length) { + AzureDiskTemplate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.keyId = reader.string(); + case 1: { + message.sizeGib = reader.int32(); break; } default: @@ -13762,123 +20427,129 @@ }; /** - * Decodes an AzureDatabaseEncryption message from the specified reader or buffer, length delimited. + * Decodes an AzureDiskTemplate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} AzureDatabaseEncryption + * @returns {google.cloud.gkemulticloud.v1.AzureDiskTemplate} AzureDiskTemplate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureDatabaseEncryption.decodeDelimited = function decodeDelimited(reader) { + AzureDiskTemplate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureDatabaseEncryption message. + * Verifies an AzureDiskTemplate message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureDatabaseEncryption.verify = function verify(message) { + AzureDiskTemplate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) - if (!$util.isString(message.keyId)) - return "keyId: string expected"; + if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) + if (!$util.isInteger(message.sizeGib)) + return "sizeGib: integer expected"; return null; }; /** - * Creates an AzureDatabaseEncryption message from a plain object. Also converts values to their respective internal types. + * Creates an AzureDiskTemplate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} AzureDatabaseEncryption + * @returns {google.cloud.gkemulticloud.v1.AzureDiskTemplate} AzureDiskTemplate */ - AzureDatabaseEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption) + AzureDiskTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureDatabaseEncryption(); - if (object.keyId != null) - message.keyId = String(object.keyId); + var message = new $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate(); + if (object.sizeGib != null) + message.sizeGib = object.sizeGib | 0; return message; }; /** - * Creates a plain object from an AzureDatabaseEncryption message. Also converts values to other types if specified. + * Creates a plain object from an AzureDiskTemplate message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static - * @param {google.cloud.gkemulticloud.v1.AzureDatabaseEncryption} message AzureDatabaseEncryption + * @param {google.cloud.gkemulticloud.v1.AzureDiskTemplate} message AzureDiskTemplate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureDatabaseEncryption.toObject = function toObject(message, options) { + AzureDiskTemplate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.keyId = ""; - if (message.keyId != null && message.hasOwnProperty("keyId")) - object.keyId = message.keyId; + object.sizeGib = 0; + if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) + object.sizeGib = message.sizeGib; return object; }; /** - * Converts this AzureDatabaseEncryption to JSON. + * Converts this AzureDiskTemplate to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @instance * @returns {Object.} JSON object */ - AzureDatabaseEncryption.prototype.toJSON = function toJSON() { + AzureDiskTemplate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureDatabaseEncryption + * Gets the default type url for AzureDiskTemplate * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureDatabaseEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureDatabaseEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureDiskTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureDatabaseEncryption"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureDiskTemplate"; }; - return AzureDatabaseEncryption; + return AzureDiskTemplate; })(); - v1.AzureConfigEncryption = (function() { + v1.AzureClient = (function() { /** - * Properties of an AzureConfigEncryption. + * Properties of an AzureClient. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureConfigEncryption - * @property {string|null} [keyId] AzureConfigEncryption keyId - * @property {string|null} [publicKey] AzureConfigEncryption publicKey + * @interface IAzureClient + * @property {string|null} [name] AzureClient name + * @property {string|null} [tenantId] AzureClient tenantId + * @property {string|null} [applicationId] AzureClient applicationId + * @property {Object.|null} [annotations] AzureClient annotations + * @property {string|null} [pemCertificate] AzureClient pemCertificate + * @property {string|null} [uid] AzureClient uid + * @property {google.protobuf.ITimestamp|null} [createTime] AzureClient createTime */ /** - * Constructs a new AzureConfigEncryption. + * Constructs a new AzureClient. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureConfigEncryption. - * @implements IAzureConfigEncryption + * @classdesc Represents an AzureClient. + * @implements IAzureClient * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureConfigEncryption=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureClient=} [properties] Properties to set */ - function AzureConfigEncryption(properties) { + function AzureClient(properties) { + this.annotations = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13886,89 +20557,179 @@ } /** - * AzureConfigEncryption keyId. - * @member {string} keyId - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * AzureClient name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @instance */ - AzureConfigEncryption.prototype.keyId = ""; + AzureClient.prototype.name = ""; /** - * AzureConfigEncryption publicKey. - * @member {string} publicKey - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * AzureClient tenantId. + * @member {string} tenantId + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @instance */ - AzureConfigEncryption.prototype.publicKey = ""; + AzureClient.prototype.tenantId = ""; /** - * Creates a new AzureConfigEncryption instance using the specified properties. + * AzureClient applicationId. + * @member {string} applicationId + * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @instance + */ + AzureClient.prototype.applicationId = ""; + + /** + * AzureClient annotations. + * @member {Object.} annotations + * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @instance + */ + AzureClient.prototype.annotations = $util.emptyObject; + + /** + * AzureClient pemCertificate. + * @member {string} pemCertificate + * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @instance + */ + AzureClient.prototype.pemCertificate = ""; + + /** + * AzureClient uid. + * @member {string} uid + * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @instance + */ + AzureClient.prototype.uid = ""; + + /** + * AzureClient createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @instance + */ + AzureClient.prototype.createTime = null; + + /** + * Creates a new AzureClient instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static - * @param {google.cloud.gkemulticloud.v1.IAzureConfigEncryption=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureConfigEncryption} AzureConfigEncryption instance + * @param {google.cloud.gkemulticloud.v1.IAzureClient=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureClient} AzureClient instance */ - AzureConfigEncryption.create = function create(properties) { - return new AzureConfigEncryption(properties); + AzureClient.create = function create(properties) { + return new AzureClient(properties); }; /** - * Encodes the specified AzureConfigEncryption message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureConfigEncryption.verify|verify} messages. + * Encodes the specified AzureClient message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClient.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static - * @param {google.cloud.gkemulticloud.v1.IAzureConfigEncryption} message AzureConfigEncryption message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClient} message AzureClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureConfigEncryption.encode = function encode(message, writer) { + AzureClient.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.keyId != null && Object.hasOwnProperty.call(message, "keyId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.keyId); - if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.publicKey); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.tenantId != null && Object.hasOwnProperty.call(message, "tenantId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tenantId); + if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.applicationId); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.uid); + 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.pemCertificate != null && Object.hasOwnProperty.call(message, "pemCertificate")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.pemCertificate); + 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 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified AzureConfigEncryption message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureConfigEncryption.verify|verify} messages. + * Encodes the specified AzureClient message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClient.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static - * @param {google.cloud.gkemulticloud.v1.IAzureConfigEncryption} message AzureConfigEncryption message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClient} message AzureClient message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureConfigEncryption.encodeDelimited = function encodeDelimited(message, writer) { + AzureClient.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureConfigEncryption message from the specified reader or buffer. + * Decodes an AzureClient message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureConfigEncryption} AzureConfigEncryption + * @returns {google.cloud.gkemulticloud.v1.AzureClient} AzureClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureConfigEncryption.decode = function decode(reader, length) { + AzureClient.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClient(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - message.keyId = reader.string(); + message.tenantId = reader.string(); break; } case 3: { - message.publicKey = reader.string(); + message.applicationId = reader.string(); + break; + } + case 8: { + 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.pemCertificate = reader.string(); + break; + } + case 5: { + message.uid = reader.string(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -13980,131 +20741,192 @@ }; /** - * Decodes an AzureConfigEncryption message from the specified reader or buffer, length delimited. + * Decodes an AzureClient message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureConfigEncryption} AzureConfigEncryption + * @returns {google.cloud.gkemulticloud.v1.AzureClient} AzureClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureConfigEncryption.decodeDelimited = function decodeDelimited(reader) { + AzureClient.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureConfigEncryption message. + * Verifies an AzureClient message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureConfigEncryption.verify = function verify(message) { + AzureClient.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) - if (!$util.isString(message.keyId)) - return "keyId: string expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - if (!$util.isString(message.publicKey)) - return "publicKey: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.tenantId != null && message.hasOwnProperty("tenantId")) + if (!$util.isString(message.tenantId)) + return "tenantId: string expected"; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (!$util.isString(message.applicationId)) + return "applicationId: 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.pemCertificate != null && message.hasOwnProperty("pemCertificate")) + if (!$util.isString(message.pemCertificate)) + return "pemCertificate: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } return null; }; /** - * Creates an AzureConfigEncryption message from a plain object. Also converts values to their respective internal types. + * Creates an AzureClient message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureConfigEncryption} AzureConfigEncryption + * @returns {google.cloud.gkemulticloud.v1.AzureClient} AzureClient */ - AzureConfigEncryption.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption) + AzureClient.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClient) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption(); - if (object.keyId != null) - message.keyId = String(object.keyId); - if (object.publicKey != null) - message.publicKey = String(object.publicKey); + var message = new $root.google.cloud.gkemulticloud.v1.AzureClient(); + if (object.name != null) + message.name = String(object.name); + if (object.tenantId != null) + message.tenantId = String(object.tenantId); + if (object.applicationId != null) + message.applicationId = String(object.applicationId); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureClient.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.pemCertificate != null) + message.pemCertificate = String(object.pemCertificate); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureClient.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } return message; }; /** - * Creates a plain object from an AzureConfigEncryption message. Also converts values to other types if specified. + * Creates a plain object from an AzureClient message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static - * @param {google.cloud.gkemulticloud.v1.AzureConfigEncryption} message AzureConfigEncryption + * @param {google.cloud.gkemulticloud.v1.AzureClient} message AzureClient * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureConfigEncryption.toObject = function toObject(message, options) { + AzureClient.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.annotations = {}; if (options.defaults) { - object.keyId = ""; - object.publicKey = ""; + object.name = ""; + object.tenantId = ""; + object.applicationId = ""; + object.uid = ""; + object.createTime = null; + object.pemCertificate = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.tenantId != null && message.hasOwnProperty("tenantId")) + object.tenantId = message.tenantId; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + object.applicationId = message.applicationId; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.pemCertificate != null && message.hasOwnProperty("pemCertificate")) + object.pemCertificate = message.pemCertificate; + 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.keyId != null && message.hasOwnProperty("keyId")) - object.keyId = message.keyId; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - object.publicKey = message.publicKey; return object; }; /** - * Converts this AzureConfigEncryption to JSON. + * Converts this AzureClient to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @instance * @returns {Object.} JSON object */ - AzureConfigEncryption.prototype.toJSON = function toJSON() { + AzureClient.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureConfigEncryption + * Gets the default type url for AzureClient * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureConfigEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureClient * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureConfigEncryption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureClient.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureConfigEncryption"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClient"; }; - return AzureConfigEncryption; + return AzureClient; })(); - v1.AzureDiskTemplate = (function() { + v1.AzureAuthorization = (function() { /** - * Properties of an AzureDiskTemplate. + * Properties of an AzureAuthorization. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureDiskTemplate - * @property {number|null} [sizeGib] AzureDiskTemplate sizeGib + * @interface IAzureAuthorization + * @property {Array.|null} [adminUsers] AzureAuthorization adminUsers */ /** - * Constructs a new AzureDiskTemplate. + * Constructs a new AzureAuthorization. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureDiskTemplate. - * @implements IAzureDiskTemplate + * @classdesc Represents an AzureAuthorization. + * @implements IAzureAuthorization * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureDiskTemplate=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureAuthorization=} [properties] Properties to set */ - function AzureDiskTemplate(properties) { + function AzureAuthorization(properties) { + this.adminUsers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14112,75 +20934,78 @@ } /** - * AzureDiskTemplate sizeGib. - * @member {number} sizeGib - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * AzureAuthorization adminUsers. + * @member {Array.} adminUsers + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @instance */ - AzureDiskTemplate.prototype.sizeGib = 0; + AzureAuthorization.prototype.adminUsers = $util.emptyArray; /** - * Creates a new AzureDiskTemplate instance using the specified properties. + * Creates a new AzureAuthorization instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IAzureDiskTemplate=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureDiskTemplate} AzureDiskTemplate instance + * @param {google.cloud.gkemulticloud.v1.IAzureAuthorization=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureAuthorization} AzureAuthorization instance */ - AzureDiskTemplate.create = function create(properties) { - return new AzureDiskTemplate(properties); + AzureAuthorization.create = function create(properties) { + return new AzureAuthorization(properties); }; /** - * Encodes the specified AzureDiskTemplate message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify|verify} messages. + * Encodes the specified AzureAuthorization message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureAuthorization.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IAzureDiskTemplate} message AzureDiskTemplate message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureAuthorization} message AzureAuthorization message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureDiskTemplate.encode = function encode(message, writer) { + AzureAuthorization.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sizeGib != null && Object.hasOwnProperty.call(message, "sizeGib")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sizeGib); + if (message.adminUsers != null && message.adminUsers.length) + for (var i = 0; i < message.adminUsers.length; ++i) + $root.google.cloud.gkemulticloud.v1.AzureClusterUser.encode(message.adminUsers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AzureDiskTemplate message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify|verify} messages. + * Encodes the specified AzureAuthorization message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureAuthorization.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.IAzureDiskTemplate} message AzureDiskTemplate message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureAuthorization} message AzureAuthorization message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureDiskTemplate.encodeDelimited = function encodeDelimited(message, writer) { + AzureAuthorization.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureDiskTemplate message from the specified reader or buffer. + * Decodes an AzureAuthorization message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureDiskTemplate} AzureDiskTemplate + * @returns {google.cloud.gkemulticloud.v1.AzureAuthorization} AzureAuthorization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureDiskTemplate.decode = function decode(reader, length) { + AzureAuthorization.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureAuthorization(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.sizeGib = reader.int32(); + if (!(message.adminUsers && message.adminUsers.length)) + message.adminUsers = []; + message.adminUsers.push($root.google.cloud.gkemulticloud.v1.AzureClusterUser.decode(reader, reader.uint32())); break; } default: @@ -14192,129 +21017,139 @@ }; /** - * Decodes an AzureDiskTemplate message from the specified reader or buffer, length delimited. + * Decodes an AzureAuthorization message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureDiskTemplate} AzureDiskTemplate + * @returns {google.cloud.gkemulticloud.v1.AzureAuthorization} AzureAuthorization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureDiskTemplate.decodeDelimited = function decodeDelimited(reader) { + AzureAuthorization.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureDiskTemplate message. + * Verifies an AzureAuthorization message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureDiskTemplate.verify = function verify(message) { + AzureAuthorization.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) - if (!$util.isInteger(message.sizeGib)) - return "sizeGib: integer expected"; + if (message.adminUsers != null && message.hasOwnProperty("adminUsers")) { + if (!Array.isArray(message.adminUsers)) + return "adminUsers: array expected"; + for (var i = 0; i < message.adminUsers.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AzureClusterUser.verify(message.adminUsers[i]); + if (error) + return "adminUsers." + error; + } + } return null; }; /** - * Creates an AzureDiskTemplate message from a plain object. Also converts values to their respective internal types. + * Creates an AzureAuthorization message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureDiskTemplate} AzureDiskTemplate + * @returns {google.cloud.gkemulticloud.v1.AzureAuthorization} AzureAuthorization */ - AzureDiskTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate) + AzureAuthorization.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureAuthorization) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate(); - if (object.sizeGib != null) - message.sizeGib = object.sizeGib | 0; + var message = new $root.google.cloud.gkemulticloud.v1.AzureAuthorization(); + if (object.adminUsers) { + if (!Array.isArray(object.adminUsers)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureAuthorization.adminUsers: array expected"); + message.adminUsers = []; + for (var i = 0; i < object.adminUsers.length; ++i) { + if (typeof object.adminUsers[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureAuthorization.adminUsers: object expected"); + message.adminUsers[i] = $root.google.cloud.gkemulticloud.v1.AzureClusterUser.fromObject(object.adminUsers[i]); + } + } return message; }; /** - * Creates a plain object from an AzureDiskTemplate message. Also converts values to other types if specified. + * Creates a plain object from an AzureAuthorization message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static - * @param {google.cloud.gkemulticloud.v1.AzureDiskTemplate} message AzureDiskTemplate + * @param {google.cloud.gkemulticloud.v1.AzureAuthorization} message AzureAuthorization * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureDiskTemplate.toObject = function toObject(message, options) { + AzureAuthorization.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sizeGib = 0; - if (message.sizeGib != null && message.hasOwnProperty("sizeGib")) - object.sizeGib = message.sizeGib; + if (options.arrays || options.defaults) + object.adminUsers = []; + if (message.adminUsers && message.adminUsers.length) { + object.adminUsers = []; + for (var j = 0; j < message.adminUsers.length; ++j) + object.adminUsers[j] = $root.google.cloud.gkemulticloud.v1.AzureClusterUser.toObject(message.adminUsers[j], options); + } return object; }; /** - * Converts this AzureDiskTemplate to JSON. + * Converts this AzureAuthorization to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @instance * @returns {Object.} JSON object */ - AzureDiskTemplate.prototype.toJSON = function toJSON() { + AzureAuthorization.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureDiskTemplate + * Gets the default type url for AzureAuthorization * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureDiskTemplate + * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureDiskTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureDiskTemplate"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureAuthorization"; }; - return AzureDiskTemplate; + return AzureAuthorization; })(); - v1.AzureClient = (function() { + v1.AzureClusterUser = (function() { /** - * Properties of an AzureClient. + * Properties of an AzureClusterUser. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureClient - * @property {string|null} [name] AzureClient name - * @property {string|null} [tenantId] AzureClient tenantId - * @property {string|null} [applicationId] AzureClient applicationId - * @property {Object.|null} [annotations] AzureClient annotations - * @property {string|null} [pemCertificate] AzureClient pemCertificate - * @property {string|null} [uid] AzureClient uid - * @property {google.protobuf.ITimestamp|null} [createTime] AzureClient createTime + * @interface IAzureClusterUser + * @property {string|null} [username] AzureClusterUser username */ /** - * Constructs a new AzureClient. + * Constructs a new AzureClusterUser. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureClient. - * @implements IAzureClient + * @classdesc Represents an AzureClusterUser. + * @implements IAzureClusterUser * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureClient=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureClusterUser=} [properties] Properties to set */ - function AzureClient(properties) { - this.annotations = {}; + function AzureClusterUser(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14322,179 +21157,75 @@ } /** - * AzureClient name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.AzureClient - * @instance - */ - AzureClient.prototype.name = ""; - - /** - * AzureClient tenantId. - * @member {string} tenantId - * @memberof google.cloud.gkemulticloud.v1.AzureClient - * @instance - */ - AzureClient.prototype.tenantId = ""; - - /** - * AzureClient applicationId. - * @member {string} applicationId - * @memberof google.cloud.gkemulticloud.v1.AzureClient - * @instance - */ - AzureClient.prototype.applicationId = ""; - - /** - * AzureClient annotations. - * @member {Object.} annotations - * @memberof google.cloud.gkemulticloud.v1.AzureClient - * @instance - */ - AzureClient.prototype.annotations = $util.emptyObject; - - /** - * AzureClient pemCertificate. - * @member {string} pemCertificate - * @memberof google.cloud.gkemulticloud.v1.AzureClient - * @instance - */ - AzureClient.prototype.pemCertificate = ""; - - /** - * AzureClient uid. - * @member {string} uid - * @memberof google.cloud.gkemulticloud.v1.AzureClient - * @instance - */ - AzureClient.prototype.uid = ""; - - /** - * AzureClient createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * AzureClusterUser username. + * @member {string} username + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @instance */ - AzureClient.prototype.createTime = null; + AzureClusterUser.prototype.username = ""; /** - * Creates a new AzureClient instance using the specified properties. + * Creates a new AzureClusterUser instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClient=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureClient} AzureClient instance + * @param {google.cloud.gkemulticloud.v1.IAzureClusterUser=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureClusterUser} AzureClusterUser instance */ - AzureClient.create = function create(properties) { - return new AzureClient(properties); + AzureClusterUser.create = function create(properties) { + return new AzureClusterUser(properties); }; /** - * Encodes the specified AzureClient message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClient.verify|verify} messages. + * Encodes the specified AzureClusterUser message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterUser.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClient} message AzureClient message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClusterUser} message AzureClusterUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureClient.encode = function encode(message, writer) { + AzureClusterUser.encode = function encode(message, writer) { 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.tenantId != null && Object.hasOwnProperty.call(message, "tenantId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tenantId); - if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.applicationId); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.uid); - 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.pemCertificate != null && Object.hasOwnProperty.call(message, "pemCertificate")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.pemCertificate); - 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 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); return writer; }; /** - * Encodes the specified AzureClient message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClient.verify|verify} messages. + * Encodes the specified AzureClusterUser message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterUser.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClient} message AzureClient message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClusterUser} message AzureClusterUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureClient.encodeDelimited = function encodeDelimited(message, writer) { + AzureClusterUser.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureClient message from the specified reader or buffer. + * Decodes an AzureClusterUser message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureClient} AzureClient + * @returns {google.cloud.gkemulticloud.v1.AzureClusterUser} AzureClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureClient.decode = function decode(reader, length) { + AzureClusterUser.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClient(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClusterUser(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.tenantId = reader.string(); - break; - } - case 3: { - message.applicationId = reader.string(); - break; - } - case 8: { - 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.pemCertificate = reader.string(); - break; - } - case 5: { - message.uid = reader.string(); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.username = reader.string(); break; } default: @@ -14506,192 +21237,138 @@ }; /** - * Decodes an AzureClient message from the specified reader or buffer, length delimited. + * Decodes an AzureClusterUser message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureClient} AzureClient + * @returns {google.cloud.gkemulticloud.v1.AzureClusterUser} AzureClusterUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureClient.decodeDelimited = function decodeDelimited(reader) { + AzureClusterUser.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureClient message. + * Verifies an AzureClusterUser message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureClient.verify = function verify(message) { + AzureClusterUser.verify = function verify(message) { if (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.tenantId != null && message.hasOwnProperty("tenantId")) - if (!$util.isString(message.tenantId)) - return "tenantId: string expected"; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (!$util.isString(message.applicationId)) - return "applicationId: 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.pemCertificate != null && message.hasOwnProperty("pemCertificate")) - if (!$util.isString(message.pemCertificate)) - return "pemCertificate: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: 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.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; return null; }; /** - * Creates an AzureClient message from a plain object. Also converts values to their respective internal types. + * Creates an AzureClusterUser message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureClient} AzureClient + * @returns {google.cloud.gkemulticloud.v1.AzureClusterUser} AzureClusterUser */ - AzureClient.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClient) + AzureClusterUser.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClusterUser) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureClient(); - if (object.name != null) - message.name = String(object.name); - if (object.tenantId != null) - message.tenantId = String(object.tenantId); - if (object.applicationId != null) - message.applicationId = String(object.applicationId); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureClient.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.pemCertificate != null) - message.pemCertificate = String(object.pemCertificate); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureClient.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } + var message = new $root.google.cloud.gkemulticloud.v1.AzureClusterUser(); + if (object.username != null) + message.username = String(object.username); return message; }; /** - * Creates a plain object from an AzureClient message. Also converts values to other types if specified. + * Creates a plain object from an AzureClusterUser message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static - * @param {google.cloud.gkemulticloud.v1.AzureClient} message AzureClient + * @param {google.cloud.gkemulticloud.v1.AzureClusterUser} message AzureClusterUser * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureClient.toObject = function toObject(message, options) { + AzureClusterUser.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.annotations = {}; - if (options.defaults) { - object.name = ""; - object.tenantId = ""; - object.applicationId = ""; - object.uid = ""; - object.createTime = null; - object.pemCertificate = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.tenantId != null && message.hasOwnProperty("tenantId")) - object.tenantId = message.tenantId; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - object.applicationId = message.applicationId; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.pemCertificate != null && message.hasOwnProperty("pemCertificate")) - object.pemCertificate = message.pemCertificate; - 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 (options.defaults) + object.username = ""; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; return object; }; /** - * Converts this AzureClient to JSON. + * Converts this AzureClusterUser to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @instance * @returns {Object.} JSON object */ - AzureClient.prototype.toJSON = function toJSON() { + AzureClusterUser.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureClient + * Gets the default type url for AzureClusterUser * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureClient + * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureClient.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureClusterUser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClient"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClusterUser"; }; - return AzureClient; + return AzureClusterUser; })(); - v1.AzureAuthorization = (function() { + v1.AzureNodePool = (function() { /** - * Properties of an AzureAuthorization. + * Properties of an AzureNodePool. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureAuthorization - * @property {Array.|null} [adminUsers] AzureAuthorization adminUsers + * @interface IAzureNodePool + * @property {string|null} [name] AzureNodePool name + * @property {string|null} [version] AzureNodePool version + * @property {google.cloud.gkemulticloud.v1.IAzureNodeConfig|null} [config] AzureNodePool config + * @property {string|null} [subnetId] AzureNodePool subnetId + * @property {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling|null} [autoscaling] AzureNodePool autoscaling + * @property {google.cloud.gkemulticloud.v1.AzureNodePool.State|null} [state] AzureNodePool state + * @property {string|null} [uid] AzureNodePool uid + * @property {boolean|null} [reconciling] AzureNodePool reconciling + * @property {google.protobuf.ITimestamp|null} [createTime] AzureNodePool createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AzureNodePool updateTime + * @property {string|null} [etag] AzureNodePool etag + * @property {Object.|null} [annotations] AzureNodePool annotations + * @property {google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null} [maxPodsConstraint] AzureNodePool maxPodsConstraint + * @property {string|null} [azureAvailabilityZone] AzureNodePool azureAvailabilityZone + * @property {Array.|null} [errors] AzureNodePool errors */ /** - * Constructs a new AzureAuthorization. + * Constructs a new AzureNodePool. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureAuthorization. - * @implements IAzureAuthorization + * @classdesc Represents an AzureNodePool. + * @implements IAzureNodePool * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureAuthorization=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureNodePool=} [properties] Properties to set */ - function AzureAuthorization(properties) { - this.adminUsers = []; + function AzureNodePool(properties) { + this.annotations = {}; + this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14699,78 +21376,294 @@ } /** - * AzureAuthorization adminUsers. - * @member {Array.} adminUsers - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * AzureNodePool name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @instance */ - AzureAuthorization.prototype.adminUsers = $util.emptyArray; + AzureNodePool.prototype.name = ""; /** - * Creates a new AzureAuthorization instance using the specified properties. + * AzureNodePool version. + * @member {string} version + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.version = ""; + + /** + * AzureNodePool config. + * @member {google.cloud.gkemulticloud.v1.IAzureNodeConfig|null|undefined} config + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.config = null; + + /** + * AzureNodePool subnetId. + * @member {string} subnetId + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.subnetId = ""; + + /** + * AzureNodePool autoscaling. + * @member {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling|null|undefined} autoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.autoscaling = null; + + /** + * AzureNodePool state. + * @member {google.cloud.gkemulticloud.v1.AzureNodePool.State} state + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.state = 0; + + /** + * AzureNodePool uid. + * @member {string} uid + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.uid = ""; + + /** + * AzureNodePool reconciling. + * @member {boolean} reconciling + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.reconciling = false; + + /** + * AzureNodePool createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.createTime = null; + + /** + * AzureNodePool updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.updateTime = null; + + /** + * AzureNodePool etag. + * @member {string} etag + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.etag = ""; + + /** + * AzureNodePool annotations. + * @member {Object.} annotations + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.annotations = $util.emptyObject; + + /** + * AzureNodePool maxPodsConstraint. + * @member {google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null|undefined} maxPodsConstraint + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.maxPodsConstraint = null; + + /** + * AzureNodePool azureAvailabilityZone. + * @member {string} azureAvailabilityZone + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.azureAvailabilityZone = ""; + + /** + * AzureNodePool errors. + * @member {Array.} errors + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @instance + */ + AzureNodePool.prototype.errors = $util.emptyArray; + + /** + * Creates a new AzureNodePool instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @static - * @param {google.cloud.gkemulticloud.v1.IAzureAuthorization=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureAuthorization} AzureAuthorization instance + * @param {google.cloud.gkemulticloud.v1.IAzureNodePool=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureNodePool} AzureNodePool instance */ - AzureAuthorization.create = function create(properties) { - return new AzureAuthorization(properties); + AzureNodePool.create = function create(properties) { + return new AzureNodePool(properties); }; /** - * Encodes the specified AzureAuthorization message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureAuthorization.verify|verify} messages. + * Encodes the specified AzureNodePool message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePool.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @static - * @param {google.cloud.gkemulticloud.v1.IAzureAuthorization} message AzureAuthorization message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureNodePool} message AzureNodePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureAuthorization.encode = function encode(message, writer) { + AzureNodePool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.adminUsers != null && message.adminUsers.length) - for (var i = 0; i < message.adminUsers.length; ++i) - $root.google.cloud.gkemulticloud.v1.AzureClusterUser.encode(message.adminUsers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.subnetId != null && Object.hasOwnProperty.call(message, "subnetId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetId); + if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) + $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.uid); + if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.reconciling); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); + 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.maxPodsConstraint != null && Object.hasOwnProperty.call(message, "maxPodsConstraint")) + $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.encode(message.maxPodsConstraint, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.encode(message.config, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.azureAvailabilityZone != null && Object.hasOwnProperty.call(message, "azureAvailabilityZone")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.azureAvailabilityZone); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.gkemulticloud.v1.AzureNodePoolError.encode(message.errors[i], writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); return writer; }; /** - * Encodes the specified AzureAuthorization message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureAuthorization.verify|verify} messages. + * Encodes the specified AzureNodePool message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @static - * @param {google.cloud.gkemulticloud.v1.IAzureAuthorization} message AzureAuthorization message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureNodePool} message AzureNodePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureAuthorization.encodeDelimited = function encodeDelimited(message, writer) { + AzureNodePool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureAuthorization message from the specified reader or buffer. + * Decodes an AzureNodePool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureAuthorization} AzureAuthorization + * @returns {google.cloud.gkemulticloud.v1.AzureNodePool} AzureNodePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureAuthorization.decode = function decode(reader, length) { + AzureNodePool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureAuthorization(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureNodePool(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.adminUsers && message.adminUsers.length)) - message.adminUsers = []; - message.adminUsers.push($root.google.cloud.gkemulticloud.v1.AzureClusterUser.decode(reader, reader.uint32())); + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + case 22: { + message.config = $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.subnetId = reader.string(); + break; + } + case 4: { + message.autoscaling = $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.decode(reader, reader.uint32()); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 8: { + message.uid = reader.string(); + break; + } + case 9: { + message.reconciling = reader.bool(); + break; + } + case 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.etag = reader.string(); + break; + } + case 13: { + 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 21: { + message.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.decode(reader, reader.uint32()); + break; + } + case 23: { + message.azureAvailabilityZone = reader.string(); + break; + } + case 29: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.gkemulticloud.v1.AzureNodePoolError.decode(reader, reader.uint32())); break; } default: @@ -14782,215 +21675,603 @@ }; /** - * Decodes an AzureAuthorization message from the specified reader or buffer, length delimited. + * Decodes an AzureNodePool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureAuthorization} AzureAuthorization + * @returns {google.cloud.gkemulticloud.v1.AzureNodePool} AzureNodePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureAuthorization.decodeDelimited = function decodeDelimited(reader) { + AzureNodePool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureAuthorization message. + * Verifies an AzureNodePool message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureAuthorization.verify = function verify(message) { + AzureNodePool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.adminUsers != null && message.hasOwnProperty("adminUsers")) { - if (!Array.isArray(message.adminUsers)) - return "adminUsers: array expected"; - for (var i = 0; i < message.adminUsers.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.AzureClusterUser.verify(message.adminUsers[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.subnetId != null && message.hasOwnProperty("subnetId")) + if (!$util.isString(message.subnetId)) + return "subnetId: string expected"; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.verify(message.autoscaling); + if (error) + return "autoscaling." + 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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + if (typeof message.reconciling !== "boolean") + return "reconciling: 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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: 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.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) { + var error = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify(message.maxPodsConstraint); + if (error) + return "maxPodsConstraint." + error; + } + if (message.azureAvailabilityZone != null && message.hasOwnProperty("azureAvailabilityZone")) + if (!$util.isString(message.azureAvailabilityZone)) + return "azureAvailabilityZone: string expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AzureNodePoolError.verify(message.errors[i]); if (error) - return "adminUsers." + error; + return "errors." + error; + } + } + return null; + }; + + /** + * Creates an AzureNodePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AzureNodePool} AzureNodePool + */ + AzureNodePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureNodePool) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AzureNodePool(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.config: object expected"); + message.config = $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.fromObject(object.config); + } + if (object.subnetId != null) + message.subnetId = String(object.subnetId); + if (object.autoscaling != null) { + if (typeof object.autoscaling !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.autoscaling: object expected"); + message.autoscaling = $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.fromObject(object.autoscaling); + } + 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 "PROVISIONING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "RECONCILING": + case 3: + message.state = 3; + break; + case "STOPPING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + case "DEGRADED": + case 6: + message.state = 6; + break; } - return null; - }; - - /** - * Creates an AzureAuthorization message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureAuthorization} AzureAuthorization - */ - AzureAuthorization.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureAuthorization) - return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureAuthorization(); - if (object.adminUsers) { - if (!Array.isArray(object.adminUsers)) - throw TypeError(".google.cloud.gkemulticloud.v1.AzureAuthorization.adminUsers: array expected"); - message.adminUsers = []; - for (var i = 0; i < object.adminUsers.length; ++i) { - if (typeof object.adminUsers[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureAuthorization.adminUsers: object expected"); - message.adminUsers[i] = $root.google.cloud.gkemulticloud.v1.AzureClusterUser.fromObject(object.adminUsers[i]); + if (object.uid != null) + message.uid = String(object.uid); + if (object.reconciling != null) + message.reconciling = Boolean(object.reconciling); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.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.gkemulticloud.v1.AzureNodePool.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.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.maxPodsConstraint != null) { + if (typeof object.maxPodsConstraint !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.maxPodsConstraint: object expected"); + message.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.fromObject(object.maxPodsConstraint); + } + if (object.azureAvailabilityZone != null) + message.azureAvailabilityZone = String(object.azureAvailabilityZone); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.errors: object expected"); + message.errors[i] = $root.google.cloud.gkemulticloud.v1.AzureNodePoolError.fromObject(object.errors[i]); } } return message; }; /** - * Creates a plain object from an AzureAuthorization message. Also converts values to other types if specified. + * Creates a plain object from an AzureNodePool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @static - * @param {google.cloud.gkemulticloud.v1.AzureAuthorization} message AzureAuthorization + * @param {google.cloud.gkemulticloud.v1.AzureNodePool} message AzureNodePool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureAuthorization.toObject = function toObject(message, options) { + AzureNodePool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.adminUsers = []; - if (message.adminUsers && message.adminUsers.length) { - object.adminUsers = []; - for (var j = 0; j < message.adminUsers.length; ++j) - object.adminUsers[j] = $root.google.cloud.gkemulticloud.v1.AzureClusterUser.toObject(message.adminUsers[j], options); + object.errors = []; + if (options.objects || options.defaults) + object.annotations = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + object.subnetId = ""; + object.autoscaling = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.uid = ""; + object.reconciling = false; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.maxPodsConstraint = null; + object.config = null; + object.azureAvailabilityZone = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.subnetId != null && message.hasOwnProperty("subnetId")) + object.subnetId = message.subnetId; + if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) + object.autoscaling = $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.toObject(message.autoscaling, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AzureNodePool.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AzureNodePool.State[message.state] : message.state; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.reconciling != null && message.hasOwnProperty("reconciling")) + object.reconciling = message.reconciling; + 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; + 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.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) + object.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.toObject(message.maxPodsConstraint, options); + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.toObject(message.config, options); + if (message.azureAvailabilityZone != null && message.hasOwnProperty("azureAvailabilityZone")) + object.azureAvailabilityZone = message.azureAvailabilityZone; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.gkemulticloud.v1.AzureNodePoolError.toObject(message.errors[j], options); } return object; }; /** - * Converts this AzureAuthorization to JSON. + * Converts this AzureNodePool to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @instance * @returns {Object.} JSON object */ - AzureAuthorization.prototype.toJSON = function toJSON() { + AzureNodePool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureAuthorization + * Gets the default type url for AzureNodePool * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureAuthorization + * @memberof google.cloud.gkemulticloud.v1.AzureNodePool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureAuthorization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureNodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureAuthorization"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureNodePool"; }; - return AzureAuthorization; - })(); + /** + * State enum. + * @name google.cloud.gkemulticloud.v1.AzureNodePool.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PROVISIONING=1 PROVISIONING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} RECONCILING=3 RECONCILING value + * @property {number} STOPPING=4 STOPPING value + * @property {number} ERROR=5 ERROR value + * @property {number} DEGRADED=6 DEGRADED value + */ + AzureNodePool.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "RECONCILING"] = 3; + values[valuesById[4] = "STOPPING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + values[valuesById[6] = "DEGRADED"] = 6; + return values; + })(); + + return AzureNodePool; + })(); + + v1.AzureNodeConfig = (function() { + + /** + * Properties of an AzureNodeConfig. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAzureNodeConfig + * @property {string|null} [vmSize] AzureNodeConfig vmSize + * @property {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null} [rootVolume] AzureNodeConfig rootVolume + * @property {Object.|null} [tags] AzureNodeConfig tags + * @property {string|null} [imageType] AzureNodeConfig imageType + * @property {google.cloud.gkemulticloud.v1.IAzureSshConfig|null} [sshConfig] AzureNodeConfig sshConfig + * @property {google.cloud.gkemulticloud.v1.IAzureProxyConfig|null} [proxyConfig] AzureNodeConfig proxyConfig + * @property {google.cloud.gkemulticloud.v1.IAzureConfigEncryption|null} [configEncryption] AzureNodeConfig configEncryption + * @property {Array.|null} [taints] AzureNodeConfig taints + * @property {Object.|null} [labels] AzureNodeConfig labels + */ + + /** + * Constructs a new AzureNodeConfig. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AzureNodeConfig. + * @implements IAzureNodeConfig + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAzureNodeConfig=} [properties] Properties to set + */ + function AzureNodeConfig(properties) { + this.tags = {}; + this.taints = []; + 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]]; + } + + /** + * AzureNodeConfig vmSize. + * @member {string} vmSize + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @instance + */ + AzureNodeConfig.prototype.vmSize = ""; + + /** + * AzureNodeConfig rootVolume. + * @member {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null|undefined} rootVolume + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @instance + */ + AzureNodeConfig.prototype.rootVolume = null; + + /** + * AzureNodeConfig tags. + * @member {Object.} tags + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @instance + */ + AzureNodeConfig.prototype.tags = $util.emptyObject; + + /** + * AzureNodeConfig imageType. + * @member {string} imageType + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @instance + */ + AzureNodeConfig.prototype.imageType = ""; + + /** + * AzureNodeConfig sshConfig. + * @member {google.cloud.gkemulticloud.v1.IAzureSshConfig|null|undefined} sshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @instance + */ + AzureNodeConfig.prototype.sshConfig = null; - v1.AzureClusterUser = (function() { + /** + * AzureNodeConfig proxyConfig. + * @member {google.cloud.gkemulticloud.v1.IAzureProxyConfig|null|undefined} proxyConfig + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @instance + */ + AzureNodeConfig.prototype.proxyConfig = null; /** - * Properties of an AzureClusterUser. - * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureClusterUser - * @property {string|null} [username] AzureClusterUser username + * AzureNodeConfig configEncryption. + * @member {google.cloud.gkemulticloud.v1.IAzureConfigEncryption|null|undefined} configEncryption + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @instance */ + AzureNodeConfig.prototype.configEncryption = null; /** - * Constructs a new AzureClusterUser. - * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureClusterUser. - * @implements IAzureClusterUser - * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureClusterUser=} [properties] Properties to set + * AzureNodeConfig taints. + * @member {Array.} taints + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @instance */ - function AzureClusterUser(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + AzureNodeConfig.prototype.taints = $util.emptyArray; /** - * AzureClusterUser username. - * @member {string} username - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser + * AzureNodeConfig labels. + * @member {Object.} labels + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig * @instance */ - AzureClusterUser.prototype.username = ""; + AzureNodeConfig.prototype.labels = $util.emptyObject; /** - * Creates a new AzureClusterUser instance using the specified properties. + * Creates a new AzureNodeConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterUser=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureClusterUser} AzureClusterUser instance + * @param {google.cloud.gkemulticloud.v1.IAzureNodeConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureNodeConfig} AzureNodeConfig instance */ - AzureClusterUser.create = function create(properties) { - return new AzureClusterUser(properties); + AzureNodeConfig.create = function create(properties) { + return new AzureNodeConfig(properties); }; /** - * Encodes the specified AzureClusterUser message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterUser.verify|verify} messages. + * Encodes the specified AzureNodeConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodeConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterUser} message AzureClusterUser message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureNodeConfig} message AzureNodeConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureClusterUser.encode = function encode(message, writer) { + AzureNodeConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); + if (message.vmSize != null && Object.hasOwnProperty.call(message, "vmSize")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.vmSize); + if (message.rootVolume != null && Object.hasOwnProperty.call(message, "rootVolume")) + $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.encode(message.rootVolume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); + if (message.sshConfig != null && Object.hasOwnProperty.call(message, "sshConfig")) + $root.google.cloud.gkemulticloud.v1.AzureSshConfig.encode(message.sshConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.imageType); + if (message.proxyConfig != null && Object.hasOwnProperty.call(message, "proxyConfig")) + $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.encode(message.proxyConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.taints != null && message.taints.length) + for (var i = 0; i < message.taints.length; ++i) + $root.google.cloud.gkemulticloud.v1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.configEncryption != null && Object.hasOwnProperty.call(message, "configEncryption")) + $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.encode(message.configEncryption, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; /** - * Encodes the specified AzureClusterUser message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterUser.verify|verify} messages. + * Encodes the specified AzureNodeConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodeConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterUser} message AzureClusterUser message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureNodeConfig} message AzureNodeConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureClusterUser.encodeDelimited = function encodeDelimited(message, writer) { + AzureNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureClusterUser message from the specified reader or buffer. + * Decodes an AzureNodeConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureClusterUser} AzureClusterUser + * @returns {google.cloud.gkemulticloud.v1.AzureNodeConfig} AzureNodeConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureClusterUser.decode = function decode(reader, length) { + AzureNodeConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClusterUser(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureNodeConfig(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.username = reader.string(); + message.vmSize = reader.string(); + break; + } + case 2: { + message.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.decode(reader, reader.uint32()); + break; + } + case 3: { + if (message.tags === $util.emptyObject) + message.tags = {}; + 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.tags[key] = value; + break; + } + case 8: { + message.imageType = reader.string(); + break; + } + case 7: { + message.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.decode(reader, reader.uint32()); + break; + } + case 12: { + message.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.taints && message.taints.length)) + message.taints = []; + message.taints.push($root.google.cloud.gkemulticloud.v1.NodeTaint.decode(reader, reader.uint32())); + break; + } + case 11: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } default: @@ -14998,418 +22279,349 @@ break; } } - return message; - }; - - /** - * Decodes an AzureClusterUser message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureClusterUser} AzureClusterUser - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AzureClusterUser.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AzureClusterUser message. - * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AzureClusterUser.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; + return message; + }; + + /** + * Decodes an AzureNodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkemulticloud.v1.AzureNodeConfig} AzureNodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureNodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AzureNodeConfig message. + * @function verify + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AzureNodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vmSize != null && message.hasOwnProperty("vmSize")) + if (!$util.isString(message.vmSize)) + return "vmSize: string expected"; + if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify(message.rootVolume); + if (error) + return "rootVolume." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!$util.isObject(message.tags)) + return "tags: object expected"; + var key = Object.keys(message.tags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.tags[key[i]])) + return "tags: string{k:string} expected"; + } + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isString(message.imageType)) + return "imageType: string expected"; + if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.verify(message.sshConfig); + if (error) + return "sshConfig." + error; + } + if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.verify(message.proxyConfig); + if (error) + return "proxyConfig." + error; + } + if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) { + var error = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.verify(message.configEncryption); + if (error) + return "configEncryption." + error; + } + if (message.taints != null && message.hasOwnProperty("taints")) { + if (!Array.isArray(message.taints)) + return "taints: array expected"; + for (var i = 0; i < message.taints.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.NodeTaint.verify(message.taints[i]); + if (error) + return "taints." + error; + } + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; /** - * Creates an AzureClusterUser message from a plain object. Also converts values to their respective internal types. + * Creates an AzureNodeConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureClusterUser} AzureClusterUser + * @returns {google.cloud.gkemulticloud.v1.AzureNodeConfig} AzureNodeConfig */ - AzureClusterUser.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClusterUser) + AzureNodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureNodeConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureClusterUser(); - if (object.username != null) - message.username = String(object.username); + var message = new $root.google.cloud.gkemulticloud.v1.AzureNodeConfig(); + if (object.vmSize != null) + message.vmSize = String(object.vmSize); + if (object.rootVolume != null) { + if (typeof object.rootVolume !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.rootVolume: object expected"); + message.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.fromObject(object.rootVolume); + } + if (object.tags) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.tags: object expected"); + message.tags = {}; + for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) + message.tags[keys[i]] = String(object.tags[keys[i]]); + } + if (object.imageType != null) + message.imageType = String(object.imageType); + if (object.sshConfig != null) { + if (typeof object.sshConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.sshConfig: object expected"); + message.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.fromObject(object.sshConfig); + } + if (object.proxyConfig != null) { + if (typeof object.proxyConfig !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.proxyConfig: object expected"); + message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.fromObject(object.proxyConfig); + } + if (object.configEncryption != null) { + if (typeof object.configEncryption !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.configEncryption: object expected"); + message.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.fromObject(object.configEncryption); + } + if (object.taints) { + if (!Array.isArray(object.taints)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.taints: array expected"); + message.taints = []; + for (var i = 0; i < object.taints.length; ++i) { + if (typeof object.taints[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.taints: object expected"); + message.taints[i] = $root.google.cloud.gkemulticloud.v1.NodeTaint.fromObject(object.taints[i]); + } + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } return message; }; /** - * Creates a plain object from an AzureClusterUser message. Also converts values to other types if specified. + * Creates a plain object from an AzureNodeConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig * @static - * @param {google.cloud.gkemulticloud.v1.AzureClusterUser} message AzureClusterUser + * @param {google.cloud.gkemulticloud.v1.AzureNodeConfig} message AzureNodeConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureClusterUser.toObject = function toObject(message, options) { + AzureNodeConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.username = ""; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - return object; - }; - - /** - * Converts this AzureClusterUser to JSON. - * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser - * @instance - * @returns {Object.} JSON object - */ - AzureClusterUser.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AzureClusterUser - * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureClusterUser - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AzureClusterUser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + if (options.arrays || options.defaults) + object.taints = []; + if (options.objects || options.defaults) { + object.tags = {}; + object.labels = {}; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClusterUser"; - }; - - return AzureClusterUser; - })(); - - v1.AzureNodePool = (function() { - - /** - * Properties of an AzureNodePool. - * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureNodePool - * @property {string|null} [name] AzureNodePool name - * @property {string|null} [version] AzureNodePool version - * @property {google.cloud.gkemulticloud.v1.IAzureNodeConfig|null} [config] AzureNodePool config - * @property {string|null} [subnetId] AzureNodePool subnetId - * @property {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling|null} [autoscaling] AzureNodePool autoscaling - * @property {google.cloud.gkemulticloud.v1.AzureNodePool.State|null} [state] AzureNodePool state - * @property {string|null} [uid] AzureNodePool uid - * @property {boolean|null} [reconciling] AzureNodePool reconciling - * @property {google.protobuf.ITimestamp|null} [createTime] AzureNodePool createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] AzureNodePool updateTime - * @property {string|null} [etag] AzureNodePool etag - * @property {Object.|null} [annotations] AzureNodePool annotations - * @property {google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null} [maxPodsConstraint] AzureNodePool maxPodsConstraint - * @property {string|null} [azureAvailabilityZone] AzureNodePool azureAvailabilityZone - */ - - /** - * Constructs a new AzureNodePool. - * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureNodePool. - * @implements IAzureNodePool - * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureNodePool=} [properties] Properties to set - */ - function AzureNodePool(properties) { - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AzureNodePool name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance - */ - AzureNodePool.prototype.name = ""; - - /** - * AzureNodePool version. - * @member {string} version - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance - */ - AzureNodePool.prototype.version = ""; - - /** - * AzureNodePool config. - * @member {google.cloud.gkemulticloud.v1.IAzureNodeConfig|null|undefined} config - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance - */ - AzureNodePool.prototype.config = null; - - /** - * AzureNodePool subnetId. - * @member {string} subnetId - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance - */ - AzureNodePool.prototype.subnetId = ""; - - /** - * AzureNodePool autoscaling. - * @member {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling|null|undefined} autoscaling - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance - */ - AzureNodePool.prototype.autoscaling = null; - - /** - * AzureNodePool state. - * @member {google.cloud.gkemulticloud.v1.AzureNodePool.State} state - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance - */ - AzureNodePool.prototype.state = 0; + if (options.defaults) { + object.vmSize = ""; + object.rootVolume = null; + object.sshConfig = null; + object.imageType = ""; + object.proxyConfig = null; + object.configEncryption = null; + } + if (message.vmSize != null && message.hasOwnProperty("vmSize")) + object.vmSize = message.vmSize; + if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) + object.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.toObject(message.rootVolume, options); + var keys2; + if (message.tags && (keys2 = Object.keys(message.tags)).length) { + object.tags = {}; + for (var j = 0; j < keys2.length; ++j) + object.tags[keys2[j]] = message.tags[keys2[j]]; + } + if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) + object.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.toObject(message.sshConfig, options); + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) + object.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.toObject(message.proxyConfig, options); + if (message.taints && message.taints.length) { + object.taints = []; + for (var j = 0; j < message.taints.length; ++j) + object.taints[j] = $root.google.cloud.gkemulticloud.v1.NodeTaint.toObject(message.taints[j], options); + } + 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.configEncryption != null && message.hasOwnProperty("configEncryption")) + object.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.toObject(message.configEncryption, options); + return object; + }; /** - * AzureNodePool uid. - * @member {string} uid - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * Converts this AzureNodeConfig to JSON. + * @function toJSON + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig * @instance + * @returns {Object.} JSON object */ - AzureNodePool.prototype.uid = ""; + AzureNodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * AzureNodePool reconciling. - * @member {boolean} reconciling - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance + * Gets the default type url for AzureNodeConfig + * @function getTypeUrl + * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - AzureNodePool.prototype.reconciling = false; + AzureNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureNodeConfig"; + }; - /** - * AzureNodePool createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance - */ - AzureNodePool.prototype.createTime = null; + return AzureNodeConfig; + })(); - /** - * AzureNodePool updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance - */ - AzureNodePool.prototype.updateTime = null; + v1.AzureNodePoolAutoscaling = (function() { /** - * AzureNodePool etag. - * @member {string} etag - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance + * Properties of an AzureNodePoolAutoscaling. + * @memberof google.cloud.gkemulticloud.v1 + * @interface IAzureNodePoolAutoscaling + * @property {number|null} [minNodeCount] AzureNodePoolAutoscaling minNodeCount + * @property {number|null} [maxNodeCount] AzureNodePoolAutoscaling maxNodeCount */ - AzureNodePool.prototype.etag = ""; /** - * AzureNodePool annotations. - * @member {Object.} annotations - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @instance + * Constructs a new AzureNodePoolAutoscaling. + * @memberof google.cloud.gkemulticloud.v1 + * @classdesc Represents an AzureNodePoolAutoscaling. + * @implements IAzureNodePoolAutoscaling + * @constructor + * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling=} [properties] Properties to set */ - AzureNodePool.prototype.annotations = $util.emptyObject; + function AzureNodePoolAutoscaling(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * AzureNodePool maxPodsConstraint. - * @member {google.cloud.gkemulticloud.v1.IMaxPodsConstraint|null|undefined} maxPodsConstraint - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * AzureNodePoolAutoscaling minNodeCount. + * @member {number} minNodeCount + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @instance */ - AzureNodePool.prototype.maxPodsConstraint = null; + AzureNodePoolAutoscaling.prototype.minNodeCount = 0; /** - * AzureNodePool azureAvailabilityZone. - * @member {string} azureAvailabilityZone - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * AzureNodePoolAutoscaling maxNodeCount. + * @member {number} maxNodeCount + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @instance */ - AzureNodePool.prototype.azureAvailabilityZone = ""; + AzureNodePoolAutoscaling.prototype.maxNodeCount = 0; /** - * Creates a new AzureNodePool instance using the specified properties. + * Creates a new AzureNodePoolAutoscaling instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodePool=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureNodePool} AzureNodePool instance + * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} AzureNodePoolAutoscaling instance */ - AzureNodePool.create = function create(properties) { - return new AzureNodePool(properties); + AzureNodePoolAutoscaling.create = function create(properties) { + return new AzureNodePoolAutoscaling(properties); }; /** - * Encodes the specified AzureNodePool message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePool.verify|verify} messages. + * Encodes the specified AzureNodePoolAutoscaling message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodePool} message AzureNodePool message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling} message AzureNodePoolAutoscaling message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureNodePool.encode = function encode(message, writer) { + AzureNodePoolAutoscaling.encode = function encode(message, writer) { 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.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - if (message.subnetId != null && Object.hasOwnProperty.call(message, "subnetId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetId); - if (message.autoscaling != null && Object.hasOwnProperty.call(message, "autoscaling")) - $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.encode(message.autoscaling, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.uid); - if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.reconciling); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); - 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.maxPodsConstraint != null && Object.hasOwnProperty.call(message, "maxPodsConstraint")) - $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.encode(message.maxPodsConstraint, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.encode(message.config, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.azureAvailabilityZone != null && Object.hasOwnProperty.call(message, "azureAvailabilityZone")) - writer.uint32(/* id 23, wireType 2 =*/186).string(message.azureAvailabilityZone); + if (message.minNodeCount != null && Object.hasOwnProperty.call(message, "minNodeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minNodeCount); + if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxNodeCount); return writer; }; /** - * Encodes the specified AzureNodePool message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePool.verify|verify} messages. + * Encodes the specified AzureNodePoolAutoscaling message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodePool} message AzureNodePool message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling} message AzureNodePoolAutoscaling message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureNodePool.encodeDelimited = function encodeDelimited(message, writer) { + AzureNodePoolAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureNodePool message from the specified reader or buffer. + * Decodes an AzureNodePoolAutoscaling message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureNodePool} AzureNodePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AzureNodePool.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureNodePool(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.version = reader.string(); - break; - } - case 22: { - message.config = $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.subnetId = reader.string(); - break; - } - case 4: { - message.autoscaling = $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.decode(reader, reader.uint32()); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 8: { - message.uid = reader.string(); - break; - } - case 9: { - message.reconciling = reader.bool(); - break; - } - case 10: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.etag = reader.string(); - break; - } - case 13: { - 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 21: { - message.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.decode(reader, reader.uint32()); + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} AzureNodePoolAutoscaling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AzureNodePoolAutoscaling.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minNodeCount = reader.int32(); break; } - case 23: { - message.azureAvailabilityZone = reader.string(); + case 2: { + message.maxNodeCount = reader.int32(); break; } default: @@ -15421,346 +22633,135 @@ }; /** - * Decodes an AzureNodePool message from the specified reader or buffer, length delimited. + * Decodes an AzureNodePoolAutoscaling message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureNodePool} AzureNodePool + * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} AzureNodePoolAutoscaling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureNodePool.decodeDelimited = function decodeDelimited(reader) { + AzureNodePoolAutoscaling.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureNodePool message. + * Verifies an AzureNodePoolAutoscaling message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureNodePool.verify = function verify(message) { + AzureNodePoolAutoscaling.verify = function verify(message) { if (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.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.subnetId != null && message.hasOwnProperty("subnetId")) - if (!$util.isString(message.subnetId)) - return "subnetId: string expected"; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.verify(message.autoscaling); - if (error) - return "autoscaling." + 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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - if (typeof message.reconciling !== "boolean") - return "reconciling: 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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: 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.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) { - var error = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.verify(message.maxPodsConstraint); - if (error) - return "maxPodsConstraint." + error; - } - if (message.azureAvailabilityZone != null && message.hasOwnProperty("azureAvailabilityZone")) - if (!$util.isString(message.azureAvailabilityZone)) - return "azureAvailabilityZone: string expected"; + if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) + if (!$util.isInteger(message.minNodeCount)) + return "minNodeCount: integer expected"; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + if (!$util.isInteger(message.maxNodeCount)) + return "maxNodeCount: integer expected"; return null; }; /** - * Creates an AzureNodePool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureNodePool} AzureNodePool - */ - AzureNodePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureNodePool) - return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureNodePool(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - message.version = String(object.version); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.config: object expected"); - message.config = $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.fromObject(object.config); - } - if (object.subnetId != null) - message.subnetId = String(object.subnetId); - if (object.autoscaling != null) { - if (typeof object.autoscaling !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.autoscaling: object expected"); - message.autoscaling = $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.fromObject(object.autoscaling); - } - 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 "PROVISIONING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "RECONCILING": - case 3: - message.state = 3; - break; - case "STOPPING": - case 4: - message.state = 4; - break; - case "ERROR": - case 5: - message.state = 5; - break; - case "DEGRADED": - case 6: - message.state = 6; - break; - } - if (object.uid != null) - message.uid = String(object.uid); - if (object.reconciling != null) - message.reconciling = Boolean(object.reconciling); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.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.gkemulticloud.v1.AzureNodePool.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.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.maxPodsConstraint != null) { - if (typeof object.maxPodsConstraint !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodePool.maxPodsConstraint: object expected"); - message.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.fromObject(object.maxPodsConstraint); - } - if (object.azureAvailabilityZone != null) - message.azureAvailabilityZone = String(object.azureAvailabilityZone); - return message; - }; - - /** - * Creates a plain object from an AzureNodePool message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool - * @static - * @param {google.cloud.gkemulticloud.v1.AzureNodePool} message AzureNodePool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AzureNodePool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.annotations = {}; - if (options.defaults) { - object.name = ""; - object.version = ""; - object.subnetId = ""; - object.autoscaling = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.uid = ""; - object.reconciling = false; - object.createTime = null; - object.updateTime = null; - object.etag = ""; - object.maxPodsConstraint = null; - object.config = null; - object.azureAvailabilityZone = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.subnetId != null && message.hasOwnProperty("subnetId")) - object.subnetId = message.subnetId; - if (message.autoscaling != null && message.hasOwnProperty("autoscaling")) - object.autoscaling = $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.toObject(message.autoscaling, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.gkemulticloud.v1.AzureNodePool.State[message.state] === undefined ? message.state : $root.google.cloud.gkemulticloud.v1.AzureNodePool.State[message.state] : message.state; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.reconciling != null && message.hasOwnProperty("reconciling")) - object.reconciling = message.reconciling; - 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; - 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]]; + * Creates an AzureNodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} AzureNodePoolAutoscaling + */ + AzureNodePoolAutoscaling.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) + return object; + var message = new $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling(); + if (object.minNodeCount != null) + message.minNodeCount = object.minNodeCount | 0; + if (object.maxNodeCount != null) + message.maxNodeCount = object.maxNodeCount | 0; + return message; + }; + + /** + * Creates a plain object from an AzureNodePoolAutoscaling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @static + * @param {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} message AzureNodePoolAutoscaling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AzureNodePoolAutoscaling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.minNodeCount = 0; + object.maxNodeCount = 0; } - if (message.maxPodsConstraint != null && message.hasOwnProperty("maxPodsConstraint")) - object.maxPodsConstraint = $root.google.cloud.gkemulticloud.v1.MaxPodsConstraint.toObject(message.maxPodsConstraint, options); - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.gkemulticloud.v1.AzureNodeConfig.toObject(message.config, options); - if (message.azureAvailabilityZone != null && message.hasOwnProperty("azureAvailabilityZone")) - object.azureAvailabilityZone = message.azureAvailabilityZone; + if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) + object.minNodeCount = message.minNodeCount; + if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) + object.maxNodeCount = message.maxNodeCount; return object; }; /** - * Converts this AzureNodePool to JSON. + * Converts this AzureNodePoolAutoscaling to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @instance * @returns {Object.} JSON object */ - AzureNodePool.prototype.toJSON = function toJSON() { + AzureNodePoolAutoscaling.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureNodePool + * Gets the default type url for AzureNodePoolAutoscaling * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureNodePool + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureNodePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureNodePoolAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureNodePool"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling"; }; - /** - * State enum. - * @name google.cloud.gkemulticloud.v1.AzureNodePool.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PROVISIONING=1 PROVISIONING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} RECONCILING=3 RECONCILING value - * @property {number} STOPPING=4 STOPPING value - * @property {number} ERROR=5 ERROR value - * @property {number} DEGRADED=6 DEGRADED value - */ - AzureNodePool.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROVISIONING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "RECONCILING"] = 3; - values[valuesById[4] = "STOPPING"] = 4; - values[valuesById[5] = "ERROR"] = 5; - values[valuesById[6] = "DEGRADED"] = 6; - return values; - })(); - - return AzureNodePool; + return AzureNodePoolAutoscaling; })(); - v1.AzureNodeConfig = (function() { + v1.AzureServerConfig = (function() { /** - * Properties of an AzureNodeConfig. + * Properties of an AzureServerConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureNodeConfig - * @property {string|null} [vmSize] AzureNodeConfig vmSize - * @property {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null} [rootVolume] AzureNodeConfig rootVolume - * @property {Object.|null} [tags] AzureNodeConfig tags - * @property {string|null} [imageType] AzureNodeConfig imageType - * @property {google.cloud.gkemulticloud.v1.IAzureSshConfig|null} [sshConfig] AzureNodeConfig sshConfig - * @property {google.cloud.gkemulticloud.v1.IAzureProxyConfig|null} [proxyConfig] AzureNodeConfig proxyConfig - * @property {google.cloud.gkemulticloud.v1.IAzureConfigEncryption|null} [configEncryption] AzureNodeConfig configEncryption - * @property {Array.|null} [taints] AzureNodeConfig taints - * @property {Object.|null} [labels] AzureNodeConfig labels + * @interface IAzureServerConfig + * @property {string|null} [name] AzureServerConfig name + * @property {Array.|null} [validVersions] AzureServerConfig validVersions + * @property {Array.|null} [supportedAzureRegions] AzureServerConfig supportedAzureRegions */ /** - * Constructs a new AzureNodeConfig. + * Constructs a new AzureServerConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureNodeConfig. - * @implements IAzureNodeConfig + * @classdesc Represents an AzureServerConfig. + * @implements IAzureServerConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureNodeConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureServerConfig=} [properties] Properties to set */ - function AzureNodeConfig(properties) { - this.tags = {}; - this.taints = []; - this.labels = {}; + function AzureServerConfig(properties) { + this.validVersions = []; + this.supportedAzureRegions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15768,230 +22769,109 @@ } /** - * AzureNodeConfig vmSize. - * @member {string} vmSize - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig - * @instance - */ - AzureNodeConfig.prototype.vmSize = ""; - - /** - * AzureNodeConfig rootVolume. - * @member {google.cloud.gkemulticloud.v1.IAzureDiskTemplate|null|undefined} rootVolume - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig - * @instance - */ - AzureNodeConfig.prototype.rootVolume = null; - - /** - * AzureNodeConfig tags. - * @member {Object.} tags - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig - * @instance - */ - AzureNodeConfig.prototype.tags = $util.emptyObject; - - /** - * AzureNodeConfig imageType. - * @member {string} imageType - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig - * @instance - */ - AzureNodeConfig.prototype.imageType = ""; - - /** - * AzureNodeConfig sshConfig. - * @member {google.cloud.gkemulticloud.v1.IAzureSshConfig|null|undefined} sshConfig - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig - * @instance - */ - AzureNodeConfig.prototype.sshConfig = null; - - /** - * AzureNodeConfig proxyConfig. - * @member {google.cloud.gkemulticloud.v1.IAzureProxyConfig|null|undefined} proxyConfig - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig - * @instance - */ - AzureNodeConfig.prototype.proxyConfig = null; - - /** - * AzureNodeConfig configEncryption. - * @member {google.cloud.gkemulticloud.v1.IAzureConfigEncryption|null|undefined} configEncryption - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * AzureServerConfig name. + * @member {string} name + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @instance */ - AzureNodeConfig.prototype.configEncryption = null; + AzureServerConfig.prototype.name = ""; /** - * AzureNodeConfig taints. - * @member {Array.} taints - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * AzureServerConfig validVersions. + * @member {Array.} validVersions + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @instance */ - AzureNodeConfig.prototype.taints = $util.emptyArray; + AzureServerConfig.prototype.validVersions = $util.emptyArray; /** - * AzureNodeConfig labels. - * @member {Object.} labels - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * AzureServerConfig supportedAzureRegions. + * @member {Array.} supportedAzureRegions + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @instance */ - AzureNodeConfig.prototype.labels = $util.emptyObject; + AzureServerConfig.prototype.supportedAzureRegions = $util.emptyArray; /** - * Creates a new AzureNodeConfig instance using the specified properties. + * Creates a new AzureServerConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodeConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureNodeConfig} AzureNodeConfig instance + * @param {google.cloud.gkemulticloud.v1.IAzureServerConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureServerConfig} AzureServerConfig instance */ - AzureNodeConfig.create = function create(properties) { - return new AzureNodeConfig(properties); + AzureServerConfig.create = function create(properties) { + return new AzureServerConfig(properties); }; /** - * Encodes the specified AzureNodeConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodeConfig.verify|verify} messages. + * Encodes the specified AzureServerConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureServerConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodeConfig} message AzureNodeConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureServerConfig} message AzureServerConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureNodeConfig.encode = function encode(message, writer) { + AzureServerConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vmSize != null && Object.hasOwnProperty.call(message, "vmSize")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vmSize); - if (message.rootVolume != null && Object.hasOwnProperty.call(message, "rootVolume")) - $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.encode(message.rootVolume, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); - if (message.sshConfig != null && Object.hasOwnProperty.call(message, "sshConfig")) - $root.google.cloud.gkemulticloud.v1.AzureSshConfig.encode(message.sshConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.imageType); - if (message.proxyConfig != null && Object.hasOwnProperty.call(message, "proxyConfig")) - $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.encode(message.proxyConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.taints != null && message.taints.length) - for (var i = 0; i < message.taints.length; ++i) - $root.google.cloud.gkemulticloud.v1.NodeTaint.encode(message.taints[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.configEncryption != null && Object.hasOwnProperty.call(message, "configEncryption")) - $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.encode(message.configEncryption, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.validVersions != null && message.validVersions.length) + for (var i = 0; i < message.validVersions.length; ++i) + $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.encode(message.validVersions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.supportedAzureRegions != null && message.supportedAzureRegions.length) + for (var i = 0; i < message.supportedAzureRegions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedAzureRegions[i]); return writer; }; /** - * Encodes the specified AzureNodeConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodeConfig.verify|verify} messages. + * Encodes the specified AzureServerConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureServerConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodeConfig} message AzureNodeConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureServerConfig} message AzureServerConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureNodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + AzureServerConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureNodeConfig message from the specified reader or buffer. + * Decodes an AzureServerConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureNodeConfig} AzureNodeConfig + * @returns {google.cloud.gkemulticloud.v1.AzureServerConfig} AzureServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureNodeConfig.decode = function decode(reader, length) { + AzureServerConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureNodeConfig(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureServerConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.vmSize = reader.string(); + message.name = reader.string(); break; } case 2: { - message.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.decode(reader, reader.uint32()); + if (!(message.validVersions && message.validVersions.length)) + message.validVersions = []; + message.validVersions.push($root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.decode(reader, reader.uint32())); break; } case 3: { - if (message.tags === $util.emptyObject) - message.tags = {}; - 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.tags[key] = value; - break; - } - case 8: { - message.imageType = reader.string(); - break; - } - case 7: { - message.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.decode(reader, reader.uint32()); - break; - } - case 12: { - message.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.taints && message.taints.length)) - message.taints = []; - message.taints.push($root.google.cloud.gkemulticloud.v1.NodeTaint.decode(reader, reader.uint32())); - break; - } - case 11: { - 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; + if (!(message.supportedAzureRegions && message.supportedAzureRegions.length)) + message.supportedAzureRegions = []; + message.supportedAzureRegions.push(reader.string()); break; } default: @@ -16003,255 +22883,169 @@ }; /** - * Decodes an AzureNodeConfig message from the specified reader or buffer, length delimited. + * Decodes an AzureServerConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureNodeConfig} AzureNodeConfig + * @returns {google.cloud.gkemulticloud.v1.AzureServerConfig} AzureServerConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureNodeConfig.decodeDelimited = function decodeDelimited(reader) { + AzureServerConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureNodeConfig message. + * Verifies an AzureServerConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureNodeConfig.verify = function verify(message) { + AzureServerConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vmSize != null && message.hasOwnProperty("vmSize")) - if (!$util.isString(message.vmSize)) - return "vmSize: string expected"; - if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.verify(message.rootVolume); - if (error) - return "rootVolume." + error; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!$util.isObject(message.tags)) - return "tags: object expected"; - var key = Object.keys(message.tags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) - return "tags: string{k:string} expected"; - } - if (message.imageType != null && message.hasOwnProperty("imageType")) - if (!$util.isString(message.imageType)) - return "imageType: string expected"; - if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.verify(message.sshConfig); - if (error) - return "sshConfig." + error; - } - if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.verify(message.proxyConfig); - if (error) - return "proxyConfig." + error; - } - if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) { - var error = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.verify(message.configEncryption); - if (error) - return "configEncryption." + error; - } - if (message.taints != null && message.hasOwnProperty("taints")) { - if (!Array.isArray(message.taints)) - return "taints: array expected"; - for (var i = 0; i < message.taints.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.NodeTaint.verify(message.taints[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.validVersions != null && message.hasOwnProperty("validVersions")) { + if (!Array.isArray(message.validVersions)) + return "validVersions: array expected"; + for (var i = 0; i < message.validVersions.length; ++i) { + var error = $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.verify(message.validVersions[i]); if (error) - return "taints." + error; + return "validVersions." + error; } } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.supportedAzureRegions != null && message.hasOwnProperty("supportedAzureRegions")) { + if (!Array.isArray(message.supportedAzureRegions)) + return "supportedAzureRegions: array expected"; + for (var i = 0; i < message.supportedAzureRegions.length; ++i) + if (!$util.isString(message.supportedAzureRegions[i])) + return "supportedAzureRegions: string[] expected"; } return null; }; /** - * Creates an AzureNodeConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AzureServerConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureNodeConfig} AzureNodeConfig + * @returns {google.cloud.gkemulticloud.v1.AzureServerConfig} AzureServerConfig */ - AzureNodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureNodeConfig) + AzureServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureServerConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureNodeConfig(); - if (object.vmSize != null) - message.vmSize = String(object.vmSize); - if (object.rootVolume != null) { - if (typeof object.rootVolume !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.rootVolume: object expected"); - message.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.fromObject(object.rootVolume); - } - if (object.tags) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.tags: object expected"); - message.tags = {}; - for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) - message.tags[keys[i]] = String(object.tags[keys[i]]); - } - if (object.imageType != null) - message.imageType = String(object.imageType); - if (object.sshConfig != null) { - if (typeof object.sshConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.sshConfig: object expected"); - message.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.fromObject(object.sshConfig); - } - if (object.proxyConfig != null) { - if (typeof object.proxyConfig !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.proxyConfig: object expected"); - message.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.fromObject(object.proxyConfig); - } - if (object.configEncryption != null) { - if (typeof object.configEncryption !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.configEncryption: object expected"); - message.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.fromObject(object.configEncryption); - } - if (object.taints) { - if (!Array.isArray(object.taints)) - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.taints: array expected"); - message.taints = []; - for (var i = 0; i < object.taints.length; ++i) { - if (typeof object.taints[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.taints: object expected"); - message.taints[i] = $root.google.cloud.gkemulticloud.v1.NodeTaint.fromObject(object.taints[i]); + var message = new $root.google.cloud.gkemulticloud.v1.AzureServerConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.validVersions) { + if (!Array.isArray(object.validVersions)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureServerConfig.validVersions: array expected"); + message.validVersions = []; + for (var i = 0; i < object.validVersions.length; ++i) { + if (typeof object.validVersions[i] !== "object") + throw TypeError(".google.cloud.gkemulticloud.v1.AzureServerConfig.validVersions: object expected"); + message.validVersions[i] = $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.fromObject(object.validVersions[i]); } } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureNodeConfig.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.supportedAzureRegions) { + if (!Array.isArray(object.supportedAzureRegions)) + throw TypeError(".google.cloud.gkemulticloud.v1.AzureServerConfig.supportedAzureRegions: array expected"); + message.supportedAzureRegions = []; + for (var i = 0; i < object.supportedAzureRegions.length; ++i) + message.supportedAzureRegions[i] = String(object.supportedAzureRegions[i]); } return message; }; /** - * Creates a plain object from an AzureNodeConfig message. Also converts values to other types if specified. + * Creates a plain object from an AzureServerConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static - * @param {google.cloud.gkemulticloud.v1.AzureNodeConfig} message AzureNodeConfig + * @param {google.cloud.gkemulticloud.v1.AzureServerConfig} message AzureServerConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureNodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taints = []; - if (options.objects || options.defaults) { - object.tags = {}; - object.labels = {}; - } - if (options.defaults) { - object.vmSize = ""; - object.rootVolume = null; - object.sshConfig = null; - object.imageType = ""; - object.proxyConfig = null; - object.configEncryption = null; - } - if (message.vmSize != null && message.hasOwnProperty("vmSize")) - object.vmSize = message.vmSize; - if (message.rootVolume != null && message.hasOwnProperty("rootVolume")) - object.rootVolume = $root.google.cloud.gkemulticloud.v1.AzureDiskTemplate.toObject(message.rootVolume, options); - var keys2; - if (message.tags && (keys2 = Object.keys(message.tags)).length) { - object.tags = {}; - for (var j = 0; j < keys2.length; ++j) - object.tags[keys2[j]] = message.tags[keys2[j]]; + AzureServerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.validVersions = []; + object.supportedAzureRegions = []; } - if (message.sshConfig != null && message.hasOwnProperty("sshConfig")) - object.sshConfig = $root.google.cloud.gkemulticloud.v1.AzureSshConfig.toObject(message.sshConfig, options); - if (message.imageType != null && message.hasOwnProperty("imageType")) - object.imageType = message.imageType; - if (message.proxyConfig != null && message.hasOwnProperty("proxyConfig")) - object.proxyConfig = $root.google.cloud.gkemulticloud.v1.AzureProxyConfig.toObject(message.proxyConfig, options); - if (message.taints && message.taints.length) { - object.taints = []; - for (var j = 0; j < message.taints.length; ++j) - object.taints[j] = $root.google.cloud.gkemulticloud.v1.NodeTaint.toObject(message.taints[j], options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validVersions && message.validVersions.length) { + object.validVersions = []; + for (var j = 0; j < message.validVersions.length; ++j) + object.validVersions[j] = $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.toObject(message.validVersions[j], options); } - 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.supportedAzureRegions && message.supportedAzureRegions.length) { + object.supportedAzureRegions = []; + for (var j = 0; j < message.supportedAzureRegions.length; ++j) + object.supportedAzureRegions[j] = message.supportedAzureRegions[j]; } - if (message.configEncryption != null && message.hasOwnProperty("configEncryption")) - object.configEncryption = $root.google.cloud.gkemulticloud.v1.AzureConfigEncryption.toObject(message.configEncryption, options); return object; }; /** - * Converts this AzureNodeConfig to JSON. + * Converts this AzureServerConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @instance * @returns {Object.} JSON object */ - AzureNodeConfig.prototype.toJSON = function toJSON() { + AzureServerConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureNodeConfig + * Gets the default type url for AzureServerConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureNodeConfig + * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureNodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureNodeConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureServerConfig"; }; - return AzureNodeConfig; + return AzureServerConfig; })(); - v1.AzureNodePoolAutoscaling = (function() { + v1.AzureK8sVersionInfo = (function() { /** - * Properties of an AzureNodePoolAutoscaling. + * Properties of an AzureK8sVersionInfo. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureNodePoolAutoscaling - * @property {number|null} [minNodeCount] AzureNodePoolAutoscaling minNodeCount - * @property {number|null} [maxNodeCount] AzureNodePoolAutoscaling maxNodeCount + * @interface IAzureK8sVersionInfo + * @property {string|null} [version] AzureK8sVersionInfo version */ /** - * Constructs a new AzureNodePoolAutoscaling. + * Constructs a new AzureK8sVersionInfo. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureNodePoolAutoscaling. - * @implements IAzureNodePoolAutoscaling + * @classdesc Represents an AzureK8sVersionInfo. + * @implements IAzureK8sVersionInfo * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureK8sVersionInfo=} [properties] Properties to set */ - function AzureNodePoolAutoscaling(properties) { + function AzureK8sVersionInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16259,89 +23053,75 @@ } /** - * AzureNodePoolAutoscaling minNodeCount. - * @member {number} minNodeCount - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling - * @instance - */ - AzureNodePoolAutoscaling.prototype.minNodeCount = 0; - - /** - * AzureNodePoolAutoscaling maxNodeCount. - * @member {number} maxNodeCount - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * AzureK8sVersionInfo version. + * @member {string} version + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @instance */ - AzureNodePoolAutoscaling.prototype.maxNodeCount = 0; + AzureK8sVersionInfo.prototype.version = ""; /** - * Creates a new AzureNodePoolAutoscaling instance using the specified properties. + * Creates a new AzureK8sVersionInfo instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} AzureNodePoolAutoscaling instance + * @param {google.cloud.gkemulticloud.v1.IAzureK8sVersionInfo=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} AzureK8sVersionInfo instance */ - AzureNodePoolAutoscaling.create = function create(properties) { - return new AzureNodePoolAutoscaling(properties); + AzureK8sVersionInfo.create = function create(properties) { + return new AzureK8sVersionInfo(properties); }; /** - * Encodes the specified AzureNodePoolAutoscaling message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.verify|verify} messages. + * Encodes the specified AzureK8sVersionInfo message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling} message AzureNodePoolAutoscaling message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureK8sVersionInfo} message AzureK8sVersionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureNodePoolAutoscaling.encode = function encode(message, writer) { + AzureK8sVersionInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.minNodeCount != null && Object.hasOwnProperty.call(message, "minNodeCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minNodeCount); - if (message.maxNodeCount != null && Object.hasOwnProperty.call(message, "maxNodeCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxNodeCount); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); return writer; }; /** - * Encodes the specified AzureNodePoolAutoscaling message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling.verify|verify} messages. + * Encodes the specified AzureK8sVersionInfo message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static - * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolAutoscaling} message AzureNodePoolAutoscaling message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureK8sVersionInfo} message AzureK8sVersionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureNodePoolAutoscaling.encodeDelimited = function encodeDelimited(message, writer) { + AzureK8sVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureNodePoolAutoscaling message from the specified reader or buffer. + * Decodes an AzureK8sVersionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} AzureNodePoolAutoscaling + * @returns {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} AzureK8sVersionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureNodePoolAutoscaling.decode = function decode(reader, length) { + AzureK8sVersionInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.minNodeCount = reader.int32(); - break; - } - case 2: { - message.maxNodeCount = reader.int32(); + message.version = reader.string(); break; } default: @@ -16353,245 +23133,198 @@ }; /** - * Decodes an AzureNodePoolAutoscaling message from the specified reader or buffer, length delimited. + * Decodes an AzureK8sVersionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} AzureNodePoolAutoscaling + * @returns {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} AzureK8sVersionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureNodePoolAutoscaling.decodeDelimited = function decodeDelimited(reader) { + AzureK8sVersionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureNodePoolAutoscaling message. + * Verifies an AzureK8sVersionInfo message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureNodePoolAutoscaling.verify = function verify(message) { + AzureK8sVersionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) - if (!$util.isInteger(message.minNodeCount)) - return "minNodeCount: integer expected"; - if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) - if (!$util.isInteger(message.maxNodeCount)) - return "maxNodeCount: integer expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; return null; }; /** - * Creates an AzureNodePoolAutoscaling message from a plain object. Also converts values to their respective internal types. + * Creates an AzureK8sVersionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} AzureNodePoolAutoscaling + * @returns {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} AzureK8sVersionInfo */ - AzureNodePoolAutoscaling.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling) + AzureK8sVersionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling(); - if (object.minNodeCount != null) - message.minNodeCount = object.minNodeCount | 0; - if (object.maxNodeCount != null) - message.maxNodeCount = object.maxNodeCount | 0; + var message = new $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo(); + if (object.version != null) + message.version = String(object.version); return message; }; /** - * Creates a plain object from an AzureNodePoolAutoscaling message. Also converts values to other types if specified. + * Creates a plain object from an AzureK8sVersionInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static - * @param {google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling} message AzureNodePoolAutoscaling + * @param {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} message AzureK8sVersionInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureNodePoolAutoscaling.toObject = function toObject(message, options) { + AzureK8sVersionInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.minNodeCount = 0; - object.maxNodeCount = 0; - } - if (message.minNodeCount != null && message.hasOwnProperty("minNodeCount")) - object.minNodeCount = message.minNodeCount; - if (message.maxNodeCount != null && message.hasOwnProperty("maxNodeCount")) - object.maxNodeCount = message.maxNodeCount; + if (options.defaults) + object.version = ""; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; }; /** - * Converts this AzureNodePoolAutoscaling to JSON. + * Converts this AzureK8sVersionInfo to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @instance * @returns {Object.} JSON object */ - AzureNodePoolAutoscaling.prototype.toJSON = function toJSON() { + AzureK8sVersionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureNodePoolAutoscaling + * Gets the default type url for AzureK8sVersionInfo * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling + * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureNodePoolAutoscaling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureK8sVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureNodePoolAutoscaling"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureK8sVersionInfo"; }; - return AzureNodePoolAutoscaling; + return AzureK8sVersionInfo; })(); - v1.AzureServerConfig = (function() { + v1.AzureSshConfig = (function() { /** - * Properties of an AzureServerConfig. + * Properties of an AzureSshConfig. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureServerConfig - * @property {string|null} [name] AzureServerConfig name - * @property {Array.|null} [validVersions] AzureServerConfig validVersions - * @property {Array.|null} [supportedAzureRegions] AzureServerConfig supportedAzureRegions + * @interface IAzureSshConfig + * @property {string|null} [authorizedKey] AzureSshConfig authorizedKey */ /** - * Constructs a new AzureServerConfig. + * Constructs a new AzureSshConfig. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureServerConfig. - * @implements IAzureServerConfig + * @classdesc Represents an AzureSshConfig. + * @implements IAzureSshConfig * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureServerConfig=} [properties] Properties to set - */ - function AzureServerConfig(properties) { - this.validVersions = []; - this.supportedAzureRegions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AzureServerConfig name. - * @member {string} name - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig - * @instance - */ - AzureServerConfig.prototype.name = ""; - - /** - * AzureServerConfig validVersions. - * @member {Array.} validVersions - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig - * @instance + * @param {google.cloud.gkemulticloud.v1.IAzureSshConfig=} [properties] Properties to set */ - AzureServerConfig.prototype.validVersions = $util.emptyArray; + function AzureSshConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * AzureServerConfig supportedAzureRegions. - * @member {Array.} supportedAzureRegions - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * AzureSshConfig authorizedKey. + * @member {string} authorizedKey + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @instance */ - AzureServerConfig.prototype.supportedAzureRegions = $util.emptyArray; + AzureSshConfig.prototype.authorizedKey = ""; /** - * Creates a new AzureServerConfig instance using the specified properties. + * Creates a new AzureSshConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureServerConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureServerConfig} AzureServerConfig instance + * @param {google.cloud.gkemulticloud.v1.IAzureSshConfig=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureSshConfig} AzureSshConfig instance */ - AzureServerConfig.create = function create(properties) { - return new AzureServerConfig(properties); + AzureSshConfig.create = function create(properties) { + return new AzureSshConfig(properties); }; /** - * Encodes the specified AzureServerConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureServerConfig.verify|verify} messages. + * Encodes the specified AzureSshConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureSshConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureServerConfig} message AzureServerConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureSshConfig} message AzureSshConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureServerConfig.encode = function encode(message, writer) { + AzureSshConfig.encode = function encode(message, writer) { 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.validVersions != null && message.validVersions.length) - for (var i = 0; i < message.validVersions.length; ++i) - $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.encode(message.validVersions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.supportedAzureRegions != null && message.supportedAzureRegions.length) - for (var i = 0; i < message.supportedAzureRegions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedAzureRegions[i]); + if (message.authorizedKey != null && Object.hasOwnProperty.call(message, "authorizedKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.authorizedKey); return writer; }; /** - * Encodes the specified AzureServerConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureServerConfig.verify|verify} messages. + * Encodes the specified AzureSshConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureSshConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static - * @param {google.cloud.gkemulticloud.v1.IAzureServerConfig} message AzureServerConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureSshConfig} message AzureSshConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureServerConfig.encodeDelimited = function encodeDelimited(message, writer) { + AzureSshConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureServerConfig message from the specified reader or buffer. + * Decodes an AzureSshConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureServerConfig} AzureServerConfig + * @returns {google.cloud.gkemulticloud.v1.AzureSshConfig} AzureSshConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureServerConfig.decode = function decode(reader, length) { + AzureSshConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureServerConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureSshConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.validVersions && message.validVersions.length)) - message.validVersions = []; - message.validVersions.push($root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.supportedAzureRegions && message.supportedAzureRegions.length)) - message.supportedAzureRegions = []; - message.supportedAzureRegions.push(reader.string()); + message.authorizedKey = reader.string(); break; } default: @@ -16603,169 +23336,123 @@ }; /** - * Decodes an AzureServerConfig message from the specified reader or buffer, length delimited. + * Decodes an AzureSshConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureServerConfig} AzureServerConfig + * @returns {google.cloud.gkemulticloud.v1.AzureSshConfig} AzureSshConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureServerConfig.decodeDelimited = function decodeDelimited(reader) { + AzureSshConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureServerConfig message. + * Verifies an AzureSshConfig message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureServerConfig.verify = function verify(message) { + AzureSshConfig.verify = function verify(message) { if (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.validVersions != null && message.hasOwnProperty("validVersions")) { - if (!Array.isArray(message.validVersions)) - return "validVersions: array expected"; - for (var i = 0; i < message.validVersions.length; ++i) { - var error = $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.verify(message.validVersions[i]); - if (error) - return "validVersions." + error; - } - } - if (message.supportedAzureRegions != null && message.hasOwnProperty("supportedAzureRegions")) { - if (!Array.isArray(message.supportedAzureRegions)) - return "supportedAzureRegions: array expected"; - for (var i = 0; i < message.supportedAzureRegions.length; ++i) - if (!$util.isString(message.supportedAzureRegions[i])) - return "supportedAzureRegions: string[] expected"; - } + if (message.authorizedKey != null && message.hasOwnProperty("authorizedKey")) + if (!$util.isString(message.authorizedKey)) + return "authorizedKey: string expected"; return null; }; /** - * Creates an AzureServerConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AzureSshConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureServerConfig} AzureServerConfig + * @returns {google.cloud.gkemulticloud.v1.AzureSshConfig} AzureSshConfig */ - AzureServerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureServerConfig) + AzureSshConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureSshConfig) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureServerConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.validVersions) { - if (!Array.isArray(object.validVersions)) - throw TypeError(".google.cloud.gkemulticloud.v1.AzureServerConfig.validVersions: array expected"); - message.validVersions = []; - for (var i = 0; i < object.validVersions.length; ++i) { - if (typeof object.validVersions[i] !== "object") - throw TypeError(".google.cloud.gkemulticloud.v1.AzureServerConfig.validVersions: object expected"); - message.validVersions[i] = $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.fromObject(object.validVersions[i]); - } - } - if (object.supportedAzureRegions) { - if (!Array.isArray(object.supportedAzureRegions)) - throw TypeError(".google.cloud.gkemulticloud.v1.AzureServerConfig.supportedAzureRegions: array expected"); - message.supportedAzureRegions = []; - for (var i = 0; i < object.supportedAzureRegions.length; ++i) - message.supportedAzureRegions[i] = String(object.supportedAzureRegions[i]); - } + var message = new $root.google.cloud.gkemulticloud.v1.AzureSshConfig(); + if (object.authorizedKey != null) + message.authorizedKey = String(object.authorizedKey); return message; }; /** - * Creates a plain object from an AzureServerConfig message. Also converts values to other types if specified. + * Creates a plain object from an AzureSshConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static - * @param {google.cloud.gkemulticloud.v1.AzureServerConfig} message AzureServerConfig + * @param {google.cloud.gkemulticloud.v1.AzureSshConfig} message AzureSshConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureServerConfig.toObject = function toObject(message, options) { + AzureSshConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.validVersions = []; - object.supportedAzureRegions = []; - } if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validVersions && message.validVersions.length) { - object.validVersions = []; - for (var j = 0; j < message.validVersions.length; ++j) - object.validVersions[j] = $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.toObject(message.validVersions[j], options); - } - if (message.supportedAzureRegions && message.supportedAzureRegions.length) { - object.supportedAzureRegions = []; - for (var j = 0; j < message.supportedAzureRegions.length; ++j) - object.supportedAzureRegions[j] = message.supportedAzureRegions[j]; - } + object.authorizedKey = ""; + if (message.authorizedKey != null && message.hasOwnProperty("authorizedKey")) + object.authorizedKey = message.authorizedKey; return object; }; /** - * Converts this AzureServerConfig to JSON. + * Converts this AzureSshConfig to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @instance * @returns {Object.} JSON object */ - AzureServerConfig.prototype.toJSON = function toJSON() { + AzureSshConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureServerConfig + * Gets the default type url for AzureSshConfig * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureServerConfig + * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureSshConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureServerConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureSshConfig"; }; - return AzureServerConfig; + return AzureSshConfig; })(); - v1.AzureK8sVersionInfo = (function() { + v1.AzureClusterResources = (function() { /** - * Properties of an AzureK8sVersionInfo. + * Properties of an AzureClusterResources. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureK8sVersionInfo - * @property {string|null} [version] AzureK8sVersionInfo version + * @interface IAzureClusterResources + * @property {string|null} [networkSecurityGroupId] AzureClusterResources networkSecurityGroupId + * @property {string|null} [controlPlaneApplicationSecurityGroupId] AzureClusterResources controlPlaneApplicationSecurityGroupId */ /** - * Constructs a new AzureK8sVersionInfo. + * Constructs a new AzureClusterResources. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureK8sVersionInfo. - * @implements IAzureK8sVersionInfo + * @classdesc Represents an AzureClusterResources. + * @implements IAzureClusterResources * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureK8sVersionInfo=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureClusterResources=} [properties] Properties to set */ - function AzureK8sVersionInfo(properties) { + function AzureClusterResources(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16773,75 +23460,89 @@ } /** - * AzureK8sVersionInfo version. - * @member {string} version - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * AzureClusterResources networkSecurityGroupId. + * @member {string} networkSecurityGroupId + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @instance */ - AzureK8sVersionInfo.prototype.version = ""; + AzureClusterResources.prototype.networkSecurityGroupId = ""; /** - * Creates a new AzureK8sVersionInfo instance using the specified properties. + * AzureClusterResources controlPlaneApplicationSecurityGroupId. + * @member {string} controlPlaneApplicationSecurityGroupId + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @instance + */ + AzureClusterResources.prototype.controlPlaneApplicationSecurityGroupId = ""; + + /** + * Creates a new AzureClusterResources instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static - * @param {google.cloud.gkemulticloud.v1.IAzureK8sVersionInfo=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} AzureK8sVersionInfo instance + * @param {google.cloud.gkemulticloud.v1.IAzureClusterResources=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureClusterResources} AzureClusterResources instance */ - AzureK8sVersionInfo.create = function create(properties) { - return new AzureK8sVersionInfo(properties); + AzureClusterResources.create = function create(properties) { + return new AzureClusterResources(properties); }; /** - * Encodes the specified AzureK8sVersionInfo message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.verify|verify} messages. + * Encodes the specified AzureClusterResources message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterResources.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static - * @param {google.cloud.gkemulticloud.v1.IAzureK8sVersionInfo} message AzureK8sVersionInfo message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClusterResources} message AzureClusterResources message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureK8sVersionInfo.encode = function encode(message, writer) { + AzureClusterResources.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.networkSecurityGroupId != null && Object.hasOwnProperty.call(message, "networkSecurityGroupId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.networkSecurityGroupId); + if (message.controlPlaneApplicationSecurityGroupId != null && Object.hasOwnProperty.call(message, "controlPlaneApplicationSecurityGroupId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.controlPlaneApplicationSecurityGroupId); return writer; }; /** - * Encodes the specified AzureK8sVersionInfo message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureK8sVersionInfo.verify|verify} messages. + * Encodes the specified AzureClusterResources message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterResources.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static - * @param {google.cloud.gkemulticloud.v1.IAzureK8sVersionInfo} message AzureK8sVersionInfo message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClusterResources} message AzureClusterResources message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureK8sVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { + AzureClusterResources.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureK8sVersionInfo message from the specified reader or buffer. + * Decodes an AzureClusterResources message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} AzureK8sVersionInfo + * @returns {google.cloud.gkemulticloud.v1.AzureClusterResources} AzureClusterResources * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureK8sVersionInfo.decode = function decode(reader, length) { + AzureClusterResources.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClusterResources(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); + message.networkSecurityGroupId = reader.string(); + break; + } + case 2: { + message.controlPlaneApplicationSecurityGroupId = reader.string(); break; } default: @@ -16853,122 +23554,131 @@ }; /** - * Decodes an AzureK8sVersionInfo message from the specified reader or buffer, length delimited. + * Decodes an AzureClusterResources message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} AzureK8sVersionInfo + * @returns {google.cloud.gkemulticloud.v1.AzureClusterResources} AzureClusterResources * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureK8sVersionInfo.decodeDelimited = function decodeDelimited(reader) { + AzureClusterResources.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureK8sVersionInfo message. + * Verifies an AzureClusterResources message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureK8sVersionInfo.verify = function verify(message) { + AzureClusterResources.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.networkSecurityGroupId != null && message.hasOwnProperty("networkSecurityGroupId")) + if (!$util.isString(message.networkSecurityGroupId)) + return "networkSecurityGroupId: string expected"; + if (message.controlPlaneApplicationSecurityGroupId != null && message.hasOwnProperty("controlPlaneApplicationSecurityGroupId")) + if (!$util.isString(message.controlPlaneApplicationSecurityGroupId)) + return "controlPlaneApplicationSecurityGroupId: string expected"; return null; }; /** - * Creates an AzureK8sVersionInfo message from a plain object. Also converts values to their respective internal types. + * Creates an AzureClusterResources message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} AzureK8sVersionInfo + * @returns {google.cloud.gkemulticloud.v1.AzureClusterResources} AzureClusterResources */ - AzureK8sVersionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo) + AzureClusterResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClusterResources) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureK8sVersionInfo(); - if (object.version != null) - message.version = String(object.version); + var message = new $root.google.cloud.gkemulticloud.v1.AzureClusterResources(); + if (object.networkSecurityGroupId != null) + message.networkSecurityGroupId = String(object.networkSecurityGroupId); + if (object.controlPlaneApplicationSecurityGroupId != null) + message.controlPlaneApplicationSecurityGroupId = String(object.controlPlaneApplicationSecurityGroupId); return message; }; /** - * Creates a plain object from an AzureK8sVersionInfo message. Also converts values to other types if specified. + * Creates a plain object from an AzureClusterResources message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static - * @param {google.cloud.gkemulticloud.v1.AzureK8sVersionInfo} message AzureK8sVersionInfo + * @param {google.cloud.gkemulticloud.v1.AzureClusterResources} message AzureClusterResources * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureK8sVersionInfo.toObject = function toObject(message, options) { + AzureClusterResources.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.version = ""; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; + if (options.defaults) { + object.networkSecurityGroupId = ""; + object.controlPlaneApplicationSecurityGroupId = ""; + } + if (message.networkSecurityGroupId != null && message.hasOwnProperty("networkSecurityGroupId")) + object.networkSecurityGroupId = message.networkSecurityGroupId; + if (message.controlPlaneApplicationSecurityGroupId != null && message.hasOwnProperty("controlPlaneApplicationSecurityGroupId")) + object.controlPlaneApplicationSecurityGroupId = message.controlPlaneApplicationSecurityGroupId; return object; }; /** - * Converts this AzureK8sVersionInfo to JSON. + * Converts this AzureClusterResources to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @instance * @returns {Object.} JSON object */ - AzureK8sVersionInfo.prototype.toJSON = function toJSON() { + AzureClusterResources.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureK8sVersionInfo + * Gets the default type url for AzureClusterResources * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureK8sVersionInfo + * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureK8sVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureClusterResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureK8sVersionInfo"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClusterResources"; }; - return AzureK8sVersionInfo; + return AzureClusterResources; })(); - v1.AzureSshConfig = (function() { + v1.AzureClusterError = (function() { /** - * Properties of an AzureSshConfig. + * Properties of an AzureClusterError. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureSshConfig - * @property {string|null} [authorizedKey] AzureSshConfig authorizedKey + * @interface IAzureClusterError + * @property {string|null} [message] AzureClusterError message */ /** - * Constructs a new AzureSshConfig. + * Constructs a new AzureClusterError. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureSshConfig. - * @implements IAzureSshConfig + * @classdesc Represents an AzureClusterError. + * @implements IAzureClusterError * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureSshConfig=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureClusterError=} [properties] Properties to set */ - function AzureSshConfig(properties) { + function AzureClusterError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16976,75 +23686,75 @@ } /** - * AzureSshConfig authorizedKey. - * @member {string} authorizedKey - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * AzureClusterError message. + * @member {string} message + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @instance */ - AzureSshConfig.prototype.authorizedKey = ""; + AzureClusterError.prototype.message = ""; /** - * Creates a new AzureSshConfig instance using the specified properties. + * Creates a new AzureClusterError instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static - * @param {google.cloud.gkemulticloud.v1.IAzureSshConfig=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureSshConfig} AzureSshConfig instance + * @param {google.cloud.gkemulticloud.v1.IAzureClusterError=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureClusterError} AzureClusterError instance */ - AzureSshConfig.create = function create(properties) { - return new AzureSshConfig(properties); + AzureClusterError.create = function create(properties) { + return new AzureClusterError(properties); }; /** - * Encodes the specified AzureSshConfig message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureSshConfig.verify|verify} messages. + * Encodes the specified AzureClusterError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterError.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static - * @param {google.cloud.gkemulticloud.v1.IAzureSshConfig} message AzureSshConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClusterError} message AzureClusterError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureSshConfig.encode = function encode(message, writer) { + AzureClusterError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.authorizedKey != null && Object.hasOwnProperty.call(message, "authorizedKey")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authorizedKey); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); return writer; }; /** - * Encodes the specified AzureSshConfig message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureSshConfig.verify|verify} messages. + * Encodes the specified AzureClusterError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static - * @param {google.cloud.gkemulticloud.v1.IAzureSshConfig} message AzureSshConfig message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureClusterError} message AzureClusterError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureSshConfig.encodeDelimited = function encodeDelimited(message, writer) { + AzureClusterError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureSshConfig message from the specified reader or buffer. + * Decodes an AzureClusterError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureSshConfig} AzureSshConfig + * @returns {google.cloud.gkemulticloud.v1.AzureClusterError} AzureClusterError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureSshConfig.decode = function decode(reader, length) { + AzureClusterError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureSshConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClusterError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.authorizedKey = reader.string(); + message.message = reader.string(); break; } default: @@ -17056,123 +23766,122 @@ }; /** - * Decodes an AzureSshConfig message from the specified reader or buffer, length delimited. + * Decodes an AzureClusterError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureSshConfig} AzureSshConfig + * @returns {google.cloud.gkemulticloud.v1.AzureClusterError} AzureClusterError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureSshConfig.decodeDelimited = function decodeDelimited(reader) { + AzureClusterError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureSshConfig message. + * Verifies an AzureClusterError message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureSshConfig.verify = function verify(message) { + AzureClusterError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.authorizedKey != null && message.hasOwnProperty("authorizedKey")) - if (!$util.isString(message.authorizedKey)) - return "authorizedKey: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; return null; }; /** - * Creates an AzureSshConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AzureClusterError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureSshConfig} AzureSshConfig + * @returns {google.cloud.gkemulticloud.v1.AzureClusterError} AzureClusterError */ - AzureSshConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureSshConfig) + AzureClusterError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClusterError) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureSshConfig(); - if (object.authorizedKey != null) - message.authorizedKey = String(object.authorizedKey); + var message = new $root.google.cloud.gkemulticloud.v1.AzureClusterError(); + if (object.message != null) + message.message = String(object.message); return message; }; /** - * Creates a plain object from an AzureSshConfig message. Also converts values to other types if specified. + * Creates a plain object from an AzureClusterError message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static - * @param {google.cloud.gkemulticloud.v1.AzureSshConfig} message AzureSshConfig + * @param {google.cloud.gkemulticloud.v1.AzureClusterError} message AzureClusterError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureSshConfig.toObject = function toObject(message, options) { + AzureClusterError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.authorizedKey = ""; - if (message.authorizedKey != null && message.hasOwnProperty("authorizedKey")) - object.authorizedKey = message.authorizedKey; + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; return object; }; /** - * Converts this AzureSshConfig to JSON. + * Converts this AzureClusterError to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @instance * @returns {Object.} JSON object */ - AzureSshConfig.prototype.toJSON = function toJSON() { + AzureClusterError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureSshConfig + * Gets the default type url for AzureClusterError * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureSshConfig + * @memberof google.cloud.gkemulticloud.v1.AzureClusterError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureSshConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureClusterError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureSshConfig"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClusterError"; }; - return AzureSshConfig; + return AzureClusterError; })(); - v1.AzureClusterResources = (function() { + v1.AzureNodePoolError = (function() { /** - * Properties of an AzureClusterResources. + * Properties of an AzureNodePoolError. * @memberof google.cloud.gkemulticloud.v1 - * @interface IAzureClusterResources - * @property {string|null} [networkSecurityGroupId] AzureClusterResources networkSecurityGroupId - * @property {string|null} [controlPlaneApplicationSecurityGroupId] AzureClusterResources controlPlaneApplicationSecurityGroupId + * @interface IAzureNodePoolError + * @property {string|null} [message] AzureNodePoolError message */ /** - * Constructs a new AzureClusterResources. + * Constructs a new AzureNodePoolError. * @memberof google.cloud.gkemulticloud.v1 - * @classdesc Represents an AzureClusterResources. - * @implements IAzureClusterResources + * @classdesc Represents an AzureNodePoolError. + * @implements IAzureNodePoolError * @constructor - * @param {google.cloud.gkemulticloud.v1.IAzureClusterResources=} [properties] Properties to set + * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolError=} [properties] Properties to set */ - function AzureClusterResources(properties) { + function AzureNodePoolError(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17180,89 +23889,75 @@ } /** - * AzureClusterResources networkSecurityGroupId. - * @member {string} networkSecurityGroupId - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources - * @instance - */ - AzureClusterResources.prototype.networkSecurityGroupId = ""; - - /** - * AzureClusterResources controlPlaneApplicationSecurityGroupId. - * @member {string} controlPlaneApplicationSecurityGroupId - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * AzureNodePoolError message. + * @member {string} message + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @instance */ - AzureClusterResources.prototype.controlPlaneApplicationSecurityGroupId = ""; + AzureNodePoolError.prototype.message = ""; /** - * Creates a new AzureClusterResources instance using the specified properties. + * Creates a new AzureNodePoolError instance using the specified properties. * @function create - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterResources=} [properties] Properties to set - * @returns {google.cloud.gkemulticloud.v1.AzureClusterResources} AzureClusterResources instance + * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolError=} [properties] Properties to set + * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolError} AzureNodePoolError instance */ - AzureClusterResources.create = function create(properties) { - return new AzureClusterResources(properties); + AzureNodePoolError.create = function create(properties) { + return new AzureNodePoolError(properties); }; /** - * Encodes the specified AzureClusterResources message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterResources.verify|verify} messages. + * Encodes the specified AzureNodePoolError message. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePoolError.verify|verify} messages. * @function encode - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterResources} message AzureClusterResources message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolError} message AzureNodePoolError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureClusterResources.encode = function encode(message, writer) { + AzureNodePoolError.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.networkSecurityGroupId != null && Object.hasOwnProperty.call(message, "networkSecurityGroupId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.networkSecurityGroupId); - if (message.controlPlaneApplicationSecurityGroupId != null && Object.hasOwnProperty.call(message, "controlPlaneApplicationSecurityGroupId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.controlPlaneApplicationSecurityGroupId); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); return writer; }; /** - * Encodes the specified AzureClusterResources message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureClusterResources.verify|verify} messages. + * Encodes the specified AzureNodePoolError message, length delimited. Does not implicitly {@link google.cloud.gkemulticloud.v1.AzureNodePoolError.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static - * @param {google.cloud.gkemulticloud.v1.IAzureClusterResources} message AzureClusterResources message or plain object to encode + * @param {google.cloud.gkemulticloud.v1.IAzureNodePoolError} message AzureNodePoolError message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureClusterResources.encodeDelimited = function encodeDelimited(message, writer) { + AzureNodePoolError.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureClusterResources message from the specified reader or buffer. + * Decodes an AzureNodePoolError message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkemulticloud.v1.AzureClusterResources} AzureClusterResources + * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolError} AzureNodePoolError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureClusterResources.decode = function decode(reader, length) { + AzureNodePoolError.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureClusterResources(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkemulticloud.v1.AzureNodePoolError(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.networkSecurityGroupId = reader.string(); - break; - } - case 2: { - message.controlPlaneApplicationSecurityGroupId = reader.string(); + message.message = reader.string(); break; } default: @@ -17274,111 +23969,102 @@ }; /** - * Decodes an AzureClusterResources message from the specified reader or buffer, length delimited. + * Decodes an AzureNodePoolError message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkemulticloud.v1.AzureClusterResources} AzureClusterResources + * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolError} AzureNodePoolError * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureClusterResources.decodeDelimited = function decodeDelimited(reader) { + AzureNodePoolError.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureClusterResources message. + * Verifies an AzureNodePoolError message. * @function verify - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureClusterResources.verify = function verify(message) { + AzureNodePoolError.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.networkSecurityGroupId != null && message.hasOwnProperty("networkSecurityGroupId")) - if (!$util.isString(message.networkSecurityGroupId)) - return "networkSecurityGroupId: string expected"; - if (message.controlPlaneApplicationSecurityGroupId != null && message.hasOwnProperty("controlPlaneApplicationSecurityGroupId")) - if (!$util.isString(message.controlPlaneApplicationSecurityGroupId)) - return "controlPlaneApplicationSecurityGroupId: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; return null; }; /** - * Creates an AzureClusterResources message from a plain object. Also converts values to their respective internal types. + * Creates an AzureNodePoolError message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkemulticloud.v1.AzureClusterResources} AzureClusterResources + * @returns {google.cloud.gkemulticloud.v1.AzureNodePoolError} AzureNodePoolError */ - AzureClusterResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureClusterResources) + AzureNodePoolError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkemulticloud.v1.AzureNodePoolError) return object; - var message = new $root.google.cloud.gkemulticloud.v1.AzureClusterResources(); - if (object.networkSecurityGroupId != null) - message.networkSecurityGroupId = String(object.networkSecurityGroupId); - if (object.controlPlaneApplicationSecurityGroupId != null) - message.controlPlaneApplicationSecurityGroupId = String(object.controlPlaneApplicationSecurityGroupId); + var message = new $root.google.cloud.gkemulticloud.v1.AzureNodePoolError(); + if (object.message != null) + message.message = String(object.message); return message; }; /** - * Creates a plain object from an AzureClusterResources message. Also converts values to other types if specified. + * Creates a plain object from an AzureNodePoolError message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static - * @param {google.cloud.gkemulticloud.v1.AzureClusterResources} message AzureClusterResources + * @param {google.cloud.gkemulticloud.v1.AzureNodePoolError} message AzureNodePoolError * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureClusterResources.toObject = function toObject(message, options) { + AzureNodePoolError.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.networkSecurityGroupId = ""; - object.controlPlaneApplicationSecurityGroupId = ""; - } - if (message.networkSecurityGroupId != null && message.hasOwnProperty("networkSecurityGroupId")) - object.networkSecurityGroupId = message.networkSecurityGroupId; - if (message.controlPlaneApplicationSecurityGroupId != null && message.hasOwnProperty("controlPlaneApplicationSecurityGroupId")) - object.controlPlaneApplicationSecurityGroupId = message.controlPlaneApplicationSecurityGroupId; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; return object; }; /** - * Converts this AzureClusterResources to JSON. + * Converts this AzureNodePoolError to JSON. * @function toJSON - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @instance * @returns {Object.} JSON object */ - AzureClusterResources.prototype.toJSON = function toJSON() { + AzureNodePoolError.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureClusterResources + * Gets the default type url for AzureNodePoolError * @function getTypeUrl - * @memberof google.cloud.gkemulticloud.v1.AzureClusterResources + * @memberof google.cloud.gkemulticloud.v1.AzureNodePoolError * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureClusterResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureNodePoolError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureClusterResources"; + return typeUrlPrefix + "/google.cloud.gkemulticloud.v1.AzureNodePoolError"; }; - return AzureClusterResources; + return AzureNodePoolError; })(); v1.AzureClusters = (function() { diff --git a/packages/google-cloud-gkemulticloud/protos/protos.json b/packages/google-cloud-gkemulticloud/protos/protos.json index cf8bb97c3e3..d13e1e6c2ff 100644 --- a/packages/google-cloud-gkemulticloud/protos/protos.json +++ b/packages/google-cloud-gkemulticloud/protos/protos.json @@ -17,6 +17,807 @@ "ruby_package": "Google::Cloud::GkeMultiCloud::V1" }, "nested": { + "AttachedCluster": { + "options": { + "(google.api.resource).type": "gkemulticloud.googleapis.com/AttachedCluster", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/attachedClusters/{attached_cluster}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oidcConfig": { + "type": "AttachedOidcConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "platformVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "distribution": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clusterRegion": { + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "fleet": { + "type": "Fleet", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reconciling": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 11 + }, + "kubernetesVersion": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "workloadIdentityConfig": { + "type": "WorkloadIdentityConfig", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "loggingConfig": { + "type": "LoggingConfig", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "errors": { + "rule": "repeated", + "type": "AttachedClusterError", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "authorization": { + "type": "AttachedClustersAuthorization", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PROVISIONING": 1, + "RUNNING": 2, + "RECONCILING": 3, + "STOPPING": 4, + "ERROR": 5, + "DEGRADED": 6 + } + } + } + }, + "AttachedClustersAuthorization": { + "fields": { + "adminUsers": { + "rule": "repeated", + "type": "AttachedClusterUser", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AttachedClusterUser": { + "fields": { + "username": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AttachedOidcConfig": { + "fields": { + "issuerUrl": { + "type": "string", + "id": 1 + }, + "jwks": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AttachedServerConfig": { + "options": { + "(google.api.resource).type": "gkemulticloud.googleapis.com/AttachedServerConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/attachedServerConfig" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "validVersions": { + "rule": "repeated", + "type": "AttachedPlatformVersionInfo", + "id": 2 + } + } + }, + "AttachedPlatformVersionInfo": { + "fields": { + "version": { + "type": "string", + "id": 1 + } + } + }, + "AttachedClusterError": { + "fields": { + "message": { + "type": "string", + "id": 1 + } + } + }, + "WorkloadIdentityConfig": { + "fields": { + "issuerUri": { + "type": "string", + "id": 1 + }, + "workloadPool": { + "type": "string", + "id": 2 + }, + "identityProvider": { + "type": "string", + "id": 3 + } + } + }, + "MaxPodsConstraint": { + "fields": { + "maxPodsPerNode": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusDetail": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "errorDetail": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "NodeTaint": { + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "effect": { + "type": "Effect", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Effect": { + "values": { + "EFFECT_UNSPECIFIED": 0, + "NO_SCHEDULE": 1, + "PREFER_NO_SCHEDULE": 2, + "NO_EXECUTE": 3 + } + } + } + }, + "Fleet": { + "fields": { + "project": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "membership": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "LoggingConfig": { + "fields": { + "componentConfig": { + "type": "LoggingComponentConfig", + "id": 1 + } + } + }, + "LoggingComponentConfig": { + "fields": { + "enableComponents": { + "rule": "repeated", + "type": "Component", + "id": 1 + } + }, + "nested": { + "Component": { + "values": { + "COMPONENT_UNSPECIFIED": 0, + "SYSTEM_COMPONENTS": 1, + "WORKLOADS": 2 + } + } + } + }, + "MonitoringConfig": { + "fields": { + "managedPrometheusConfig": { + "type": "ManagedPrometheusConfig", + "id": 2 + } + } + }, + "ManagedPrometheusConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, + "AttachedClusters": { + "options": { + "(google.api.default_host)": "gkemulticloud.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateAttachedCluster": { + "requestType": "CreateAttachedClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/attachedClusters", + "(google.api.http).body": "attached_cluster", + "(google.api.method_signature)": "parent,attached_cluster,attached_cluster_id", + "(google.longrunning.operation_info).response_type": "AttachedCluster", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/attachedClusters", + "body": "attached_cluster" + } + }, + { + "(google.api.method_signature)": "parent,attached_cluster,attached_cluster_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AttachedCluster", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateAttachedCluster": { + "requestType": "UpdateAttachedClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}", + "(google.api.http).body": "attached_cluster", + "(google.api.method_signature)": "attached_cluster,update_mask", + "(google.longrunning.operation_info).response_type": "AttachedCluster", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{attached_cluster.name=projects/*/locations/*/attachedClusters/*}", + "body": "attached_cluster" + } + }, + { + "(google.api.method_signature)": "attached_cluster,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AttachedCluster", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ImportAttachedCluster": { + "requestType": "ImportAttachedClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/attachedClusters:import", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,fleet_membership", + "(google.longrunning.operation_info).response_type": "AttachedCluster", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/attachedClusters:import", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,fleet_membership" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AttachedCluster", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetAttachedCluster": { + "requestType": "GetAttachedClusterRequest", + "responseType": "AttachedCluster", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/attachedClusters/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/attachedClusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAttachedClusters": { + "requestType": "ListAttachedClustersRequest", + "responseType": "ListAttachedClustersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/attachedClusters", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/attachedClusters" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteAttachedCluster": { + "requestType": "DeleteAttachedClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/attachedClusters/*}", + "(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/*/attachedClusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetAttachedServerConfig": { + "requestType": "GetAttachedServerConfigRequest", + "responseType": "AttachedServerConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/attachedServerConfig}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/attachedServerConfig}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GenerateAttachedClusterInstallManifest": { + "requestType": "GenerateAttachedClusterInstallManifestRequest", + "responseType": "GenerateAttachedClusterInstallManifestResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest", + "(google.api.method_signature)": "parent,attached_cluster_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}:generateAttachedClusterInstallManifest" + } + }, + { + "(google.api.method_signature)": "parent,attached_cluster_id" + } + ] + } + } + }, + "GenerateAttachedClusterInstallManifestRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkemulticloud.googleapis.com/AttachedCluster" + } + }, + "attachedClusterId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "platformVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GenerateAttachedClusterInstallManifestResponse": { + "fields": { + "manifest": { + "type": "string", + "id": 1 + } + } + }, + "CreateAttachedClusterRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkemulticloud.googleapis.com/AttachedCluster" + } + }, + "attachedCluster": { + "type": "AttachedCluster", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "attachedClusterId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4 + } + } + }, + "ImportAttachedClusterRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkemulticloud.googleapis.com/AttachedCluster" + } + }, + "validateOnly": { + "type": "bool", + "id": 2 + }, + "fleetMembership": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "platformVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "distribution": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateAttachedClusterRequest": { + "fields": { + "attachedCluster": { + "type": "AttachedCluster", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetAttachedClusterRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkemulticloud.googleapis.com/AttachedCluster" + } + } + } + }, + "ListAttachedClustersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkemulticloud.googleapis.com/AttachedCluster" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListAttachedClustersResponse": { + "fields": { + "attachedClusters": { + "rule": "repeated", + "type": "AttachedCluster", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteAttachedClusterRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkemulticloud.googleapis.com/AttachedCluster" + } + }, + "validateOnly": { + "type": "bool", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + }, + "ignoreErrors": { + "type": "bool", + "id": 5 + }, + "etag": { + "type": "string", + "id": 4 + } + } + }, + "GetAttachedServerConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkemulticloud.googleapis.com/AttachedServerConfig" + } + } + } + }, "AwsCluster": { "options": { "(google.api.resource).type": "gkemulticloud.googleapis.com/AwsCluster", @@ -134,7 +935,7 @@ "type": "Fleet", "id": 18, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, "loggingConfig": { @@ -143,6 +944,21 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "errors": { + "rule": "repeated", + "type": "AwsClusterError", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -475,6 +1291,14 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "errors": { + "rule": "repeated", + "type": "AwsNodePoolError", + "id": 29, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -580,6 +1404,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "autoscalingMetricsCollection": { + "type": "AwsAutoscalingGroupMetricsCollection", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -686,149 +1517,39 @@ } } }, - "WorkloadIdentityConfig": { - "fields": { - "issuerUri": { - "type": "string", - "id": 1 - }, - "workloadPool": { - "type": "string", - "id": 2 - }, - "identityProvider": { - "type": "string", - "id": 3 - } - } - }, - "MaxPodsConstraint": { - "fields": { - "maxPodsPerNode": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "target": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusDetail": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "errorDetail": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "NodeTaint": { + "AwsAutoscalingGroupMetricsCollection": { "fields": { - "key": { + "granularity": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "value": { + "metrics": { + "rule": "repeated", "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "effect": { - "type": "Effect", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "Effect": { - "values": { - "EFFECT_UNSPECIFIED": 0, - "NO_SCHEDULE": 1, - "PREFER_NO_SCHEDULE": 2, - "NO_EXECUTE": 3 + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "Fleet": { + "AwsClusterError": { "fields": { - "project": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "membership": { + "message": { "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "LoggingConfig": { - "fields": { - "componentConfig": { - "type": "LoggingComponentConfig", "id": 1 } } }, - "LoggingComponentConfig": { + "AwsNodePoolError": { "fields": { - "enableComponents": { - "rule": "repeated", - "type": "Component", + "message": { + "type": "string", "id": 1 } - }, - "nested": { - "Component": { - "values": { - "COMPONENT_UNSPECIFIED": 0, - "SYSTEM_COMPONENTS": 1, - "WORKLOADS": 2 - } - } } }, "AwsClusters": { @@ -1522,7 +2243,7 @@ "type": "Fleet", "id": 20, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, "managedResources": { @@ -1538,6 +2259,21 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "errors": { + "rule": "repeated", + "type": "AzureClusterError", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 25, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -1924,6 +2660,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "errors": { + "rule": "repeated", + "type": "AzureNodePoolError", + "id": 29, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -2087,6 +2831,22 @@ } } }, + "AzureClusterError": { + "fields": { + "message": { + "type": "string", + "id": 1 + } + } + }, + "AzureNodePoolError": { + "fields": { + "message": { + "type": "string", + "id": 1 + } + } + }, "AzureClusters": { "options": { "(google.api.default_host)": "gkemulticloud.googleapis.com", diff --git a/packages/google-cloud-gkemulticloud/samples/README.md b/packages/google-cloud-gkemulticloud/samples/README.md index b38554a6e80..5b2bb9ff3fe 100644 --- a/packages/google-cloud-gkemulticloud/samples/README.md +++ b/packages/google-cloud-gkemulticloud/samples/README.md @@ -12,6 +12,14 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Attached_clusters.create_attached_cluster](#attached_clusters.create_attached_cluster) + * [Attached_clusters.delete_attached_cluster](#attached_clusters.delete_attached_cluster) + * [Attached_clusters.generate_attached_cluster_install_manifest](#attached_clusters.generate_attached_cluster_install_manifest) + * [Attached_clusters.get_attached_cluster](#attached_clusters.get_attached_cluster) + * [Attached_clusters.get_attached_server_config](#attached_clusters.get_attached_server_config) + * [Attached_clusters.import_attached_cluster](#attached_clusters.import_attached_cluster) + * [Attached_clusters.list_attached_clusters](#attached_clusters.list_attached_clusters) + * [Attached_clusters.update_attached_cluster](#attached_clusters.update_attached_cluster) * [Aws_clusters.create_aws_cluster](#aws_clusters.create_aws_cluster) * [Aws_clusters.create_aws_node_pool](#aws_clusters.create_aws_node_pool) * [Aws_clusters.delete_aws_cluster](#aws_clusters.delete_aws_cluster) @@ -58,6 +66,142 @@ Before running the samples, make sure you've followed the steps outlined in +### Attached_clusters.create_attached_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.create_attached_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.create_attached_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.create_attached_cluster.js` + + +----- + + + + +### Attached_clusters.delete_attached_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.delete_attached_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.delete_attached_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.delete_attached_cluster.js` + + +----- + + + + +### Attached_clusters.generate_attached_cluster_install_manifest + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js` + + +----- + + + + +### Attached_clusters.get_attached_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_cluster.js` + + +----- + + + + +### Attached_clusters.get_attached_server_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_server_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-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_server_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_server_config.js` + + +----- + + + + +### Attached_clusters.import_attached_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.import_attached_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.import_attached_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.import_attached_cluster.js` + + +----- + + + + +### Attached_clusters.list_attached_clusters + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.list_attached_clusters.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.list_attached_clusters.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.list_attached_clusters.js` + + +----- + + + + +### Attached_clusters.update_attached_cluster + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.update_attached_cluster.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.update_attached_cluster.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.update_attached_cluster.js` + + +----- + + + + ### Aws_clusters.create_aws_cluster View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_cluster.js). diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.create_attached_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.create_attached_cluster.js similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.create_attached_cluster.js rename to packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.create_attached_cluster.js diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.delete_attached_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.delete_attached_cluster.js similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.delete_attached_cluster.js rename to packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.delete_attached_cluster.js diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js rename to packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_cluster.js similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_cluster.js rename to packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_cluster.js diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_server_config.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_server_config.js similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.get_attached_server_config.js rename to packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.get_attached_server_config.js diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.import_attached_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.import_attached_cluster.js similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.import_attached_cluster.js rename to packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.import_attached_cluster.js diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.list_attached_clusters.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.list_attached_clusters.js similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.list_attached_clusters.js rename to packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.list_attached_clusters.js diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.update_attached_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.update_attached_cluster.js similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/samples/generated/v1/attached_clusters.update_attached_cluster.js rename to packages/google-cloud-gkemulticloud/samples/generated/v1/attached_clusters.update_attached_cluster.js diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_cluster.js index eabf4f6c01b..95e2fa44f29 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_cluster.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_cluster.js @@ -29,24 +29,27 @@ function main(parent, awsCluster, awsClusterId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent location where this AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource - * will be created. + * Required. The parent location where this + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource will be + * created. * Location names are formatted as `projects//locations/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. */ // const parent = 'abc123' /** - * Required. The specification of the AwsCluster google.cloud.gkemulticloud.v1.AwsCluster to create. + * Required. The specification of the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster to create. */ // const awsCluster = {} /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the AwsCluster google.cloud.gkemulticloud.v1.AwsCluster - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource name + * formatted as * `projects//locations//awsClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ // const awsClusterId = 'abc123' /** diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_node_pool.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_node_pool.js index f70f5d8799e..acc6639b2ff 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_node_pool.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.create_aws_node_pool.js @@ -29,7 +29,8 @@ function main(parent, awsNodePool, awsNodePoolId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource where this node pool will be created. + * Required. The AwsCluster google.cloud.gkemulticloud.v1.AwsCluster + * resource where this node pool will be created. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) @@ -37,16 +38,18 @@ function main(parent, awsNodePool, awsNodePoolId) { */ // const parent = 'abc123' /** - * Required. The specification of the AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool to create. + * Required. The specification of the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool to create. */ // const awsNodePool = {} /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource name + * formatted as * `projects//locations//awsClusters//awsNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ // const awsNodePoolId = 'abc123' /** diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_cluster.js index 5091510c2fa..b8660853955 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_cluster.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_cluster.js @@ -29,7 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name the AwsCluster google.cloud.gkemulticloud.v1.AwsCluster to delete. + * Required. The resource name the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster to delete. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) @@ -41,14 +42,16 @@ function main(name) { */ // const validateOnly = true /** - * If set to true, and the AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed Operation google.longrunning.Operation will be returned. + * If set to true, and the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed Operation google.longrunning.Operation will be returned. * Useful for idempotent deletion. */ // const allowMissing = true /** - * The current etag of the AwsCluster google.cloud.gkemulticloud.v1.AwsCluster. + * The current etag of the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_node_pool.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_node_pool.js index 399d04487cb..d5d83394596 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_node_pool.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.delete_aws_node_pool.js @@ -29,7 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name the AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool to delete. + * Required. The resource name the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool to delete. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) @@ -42,14 +43,16 @@ function main(name) { */ // const validateOnly = true /** - * If set to true, and the AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed Operation google.longrunning.Operation will be returned. + * If set to true, and the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed Operation google.longrunning.Operation will be returned. * Useful for idempotent deletion. */ // const allowMissing = true /** - * The current ETag of the AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool. + * The current ETag of the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.generate_aws_access_token.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.generate_aws_access_token.js index c229726b249..b5c1980aad4 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.generate_aws_access_token.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.generate_aws_access_token.js @@ -29,7 +29,9 @@ function main(awsCluster) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to authenticate to. + * Required. The name of the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to + * authenticate to. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_cluster.js index f59c3697349..9a259c8d38e 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_cluster.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_cluster.js @@ -29,7 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to describe. + * Required. The name of the + * AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to + * describe. * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_node_pool.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_node_pool.js index c3e691da614..4c01379178b 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_node_pool.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_node_pool.js @@ -29,7 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource to describe. + * Required. The name of the + * AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource to + * describe. * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_server_config.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_server_config.js index 48e4af2efbe..0b0ee2ed3c2 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_server_config.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.get_aws_server_config.js @@ -29,7 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AwsServerConfig google.cloud.gkemulticloud.v1.AwsServerConfig resource to describe. + * Required. The name of the + * AwsServerConfig google.cloud.gkemulticloud.v1.AwsServerConfig resource + * to describe. * `AwsServerConfig` names are formatted as * `projects//locations//awsServerConfig`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.list_aws_clusters.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.list_aws_clusters.js index d11fdf765b9..d451b475cec 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.list_aws_clusters.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.list_aws_clusters.js @@ -41,13 +41,14 @@ function main(parent) { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token to determine if - * there are more instances left to be queried. + * nextPageToken google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token + * to determine if there are more instances left to be queried. */ // const pageSize = 1234 /** * The `nextPageToken` value returned from a previous - * awsClusters.list google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters request, if any. + * awsClusters.list google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters + * request, if any. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.list_aws_node_pools.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.list_aws_node_pools.js index 96b0be8fd59..6811a491a65 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.list_aws_node_pools.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.list_aws_node_pools.js @@ -42,13 +42,14 @@ function main(parent) { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token to determine if - * there are more instances left to be queried. + * nextPageToken google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token + * to determine if there are more instances left to be queried. */ // const pageSize = 1234 /** * The `nextPageToken` value returned from a previous - * awsNodePools.list google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools request, if any. + * awsNodePools.list google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools + * request, if any. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.update_aws_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.update_aws_cluster.js index 9edc143bc89..464f1a8ba39 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.update_aws_cluster.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.update_aws_cluster.js @@ -29,7 +29,8 @@ function main(awsCluster, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The AwsCluster google.cloud.gkemulticloud.v1.AwsCluster resource to update. + * Required. The AwsCluster google.cloud.gkemulticloud.v1.AwsCluster + * resource to update. */ // const awsCluster = {} /** @@ -52,14 +53,17 @@ function main(awsCluster, updateMask) { * * `control_plane.proxy_config`. * * `control_plane.proxy_config.secret_arn`. * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.size_gib`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. * * `control_plane.instance_placement.tenancy`. - * * `logging_config`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. */ // const updateMask = {} diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.update_aws_node_pool.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.update_aws_node_pool.js index 8aefc1f75d4..74fbf00ad92 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.update_aws_node_pool.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/aws_clusters.update_aws_node_pool.js @@ -29,7 +29,8 @@ function main(awsNodePool, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool resource to update. + * Required. The AwsNodePool google.cloud.gkemulticloud.v1.AwsNodePool + * resource to update. */ // const awsNodePool = {} /** @@ -55,6 +56,13 @@ function main(awsNodePool, updateMask) { * * `config.proxy_config.secret_version`. * * `config.ssh_config`. * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. */ // const updateMask = {} diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_client.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_client.js index 3cabf639fb1..312a4f413e6 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_client.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_client.js @@ -29,24 +29,27 @@ function main(parent, azureClient, azureClientId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent location where this AzureClient google.cloud.gkemulticloud.v1.AzureClient resource - * will be created. + * Required. The parent location where this + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource will be + * created. * Location names are formatted as `projects//locations/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. */ // const parent = 'abc123' /** - * Required. The specification of the AzureClient google.cloud.gkemulticloud.v1.AzureClient to create. + * Required. The specification of the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient to create. */ // const azureClient = {} /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the AzureClient google.cloud.gkemulticloud.v1.AzureClient - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource name + * formatted as * `projects//locations//azureClients/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ // const azureClientId = 'abc123' /** diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_cluster.js index 02ee6183b41..af1cd2873e1 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_cluster.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_cluster.js @@ -29,24 +29,27 @@ function main(parent, azureCluster, azureClusterId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent location where this AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource - * will be created. + * Required. The parent location where this + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource will be + * created. * Location names are formatted as `projects//locations/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. */ // const parent = 'abc123' /** - * Required. The specification of the AzureCluster google.cloud.gkemulticloud.v1.AzureCluster to create. + * Required. The specification of the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster to create. */ // const azureCluster = {} /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the AzureCluster google.cloud.gkemulticloud.v1.AzureCluster - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource name + * formatted as * `projects//locations//azureClusters/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ // const azureClusterId = 'abc123' /** diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_node_pool.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_node_pool.js index f20657b53cc..6ffd6fbc320 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_node_pool.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.create_azure_node_pool.js @@ -29,23 +29,26 @@ function main(parent, azureNodePool, azureNodePoolId) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource where this node pool will be created. + * Required. The AzureCluster google.cloud.gkemulticloud.v1.AzureCluster + * resource where this node pool will be created. * Location names are formatted as `projects//locations/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. */ // const parent = 'abc123' /** - * Required. The specification of the AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool to create. + * Required. The specification of the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool to create. */ // const azureNodePool = {} /** - * Required. A client provided ID the resource. Must be unique within the parent - * resource. - * The provided ID will be part of the AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool - * resource name formatted as + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * The provided ID will be part of the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource name + * formatted as * `projects//locations//azureClusters//azureNodePools/`. - * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters. + * Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters. */ // const azureNodePoolId = 'abc123' /** diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_client.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_client.js index 911c1183c55..438122b811e 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_client.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_client.js @@ -29,17 +29,20 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name the AzureClient google.cloud.gkemulticloud.v1.AzureClient to delete. - * AzureClient google.cloud.gkemulticloud.v1.AzureClient names are formatted as + * Required. The resource name the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient to delete. + * AzureClient google.cloud.gkemulticloud.v1.AzureClient names are + * formatted as * `projects//locations//azureClients/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. */ // const name = 'abc123' /** - * If set to true, and the AzureClient google.cloud.gkemulticloud.v1.AzureClient resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed Operation google.longrunning.Operation will be returned. + * If set to true, and the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed Operation google.longrunning.Operation will be returned. * Useful for idempotent deletion. */ // const allowMissing = true diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_cluster.js index 73d8e87bfd9..092e250c149 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_cluster.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_cluster.js @@ -29,7 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name the AzureCluster google.cloud.gkemulticloud.v1.AzureCluster to delete. + * Required. The resource name the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster to delete. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) @@ -37,9 +38,10 @@ function main(name) { */ // const name = 'abc123' /** - * If set to true, and the AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed Operation google.longrunning.Operation will be returned. + * If set to true, and the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed Operation google.longrunning.Operation will be returned. * Useful for idempotent deletion. */ // const allowMissing = true @@ -48,7 +50,8 @@ function main(name) { */ // const validateOnly = true /** - * The current etag of the AzureCluster google.cloud.gkemulticloud.v1.AzureCluster. + * The current etag of the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster. * Allows clients to perform deletions through optimistic concurrency control. * If the provided etag does not match the current etag of the cluster, * the request will fail and an ABORTED error will be returned. diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_node_pool.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_node_pool.js index 083acfcb67a..5fbd840e756 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_node_pool.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.delete_azure_node_pool.js @@ -29,7 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name the AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool to delete. + * Required. The resource name the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool to delete. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) @@ -42,14 +43,17 @@ function main(name) { */ // const validateOnly = true /** - * If set to true, and the AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed Operation google.longrunning.Operation will be returned. + * If set to true, and the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed Operation google.longrunning.Operation will be + * returned. * Useful for idempotent deletion. */ // const allowMissing = true /** - * The current ETag of the AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool. + * The current ETag of the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool. * Allows clients to perform deletions through optimistic concurrency control. * If the provided ETag does not match the current etag of the node pool, * the request will fail and an ABORTED error will be returned. diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.generate_azure_access_token.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.generate_azure_access_token.js index 4064c659524..37b152847e3 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.generate_azure_access_token.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.generate_azure_access_token.js @@ -29,7 +29,9 @@ function main(azureCluster) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to authenticate to. + * Required. The name of the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to + * authenticate to. * `AzureCluster` names are formatted as * `projects//locations//AzureClusters/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_client.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_client.js index 31a97e7443c..2a37a7c5228 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_client.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_client.js @@ -29,8 +29,11 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AzureClient google.cloud.gkemulticloud.v1.AzureClient resource to describe. - * AzureClient google.cloud.gkemulticloud.v1.AzureClient names are formatted as + * Required. The name of the + * AzureClient google.cloud.gkemulticloud.v1.AzureClient resource to + * describe. + * AzureClient google.cloud.gkemulticloud.v1.AzureClient names are + * formatted as * `projects//locations//azureClients/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_cluster.js index 743c92432d4..e2f6b162ecb 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_cluster.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_cluster.js @@ -29,7 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to describe. + * Required. The name of the + * AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to + * describe. * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_node_pool.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_node_pool.js index d4290cec1c5..6270108c0e7 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_node_pool.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_node_pool.js @@ -29,7 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource to describe. + * Required. The name of the + * AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource to + * describe. * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_server_config.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_server_config.js index 4a70dc01634..c9054337c38 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_server_config.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.get_azure_server_config.js @@ -29,7 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the AzureServerConfig google.cloud.gkemulticloud.v1.AzureServerConfig resource to describe. + * Required. The name of the + * AzureServerConfig google.cloud.gkemulticloud.v1.AzureServerConfig + * resource to describe. * `AzureServerConfig` names are formatted as * `projects//locations//azureServerConfig`. * See Resource Names (https://cloud.google.com/apis/design/resource_names) diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_clients.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_clients.js index 2a09e16a819..df70f546379 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_clients.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_clients.js @@ -41,13 +41,14 @@ function main(parent) { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token to determine if - * there are more instances left to be queried. + * nextPageToken google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token + * to determine if there are more instances left to be queried. */ // const pageSize = 1234 /** * The `nextPageToken` value returned from a previous - * azureClients.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients request, if any. + * azureClients.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients + * request, if any. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_clusters.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_clusters.js index 98d505407c0..798c2bbbc80 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_clusters.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_clusters.js @@ -41,13 +41,14 @@ function main(parent) { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token to determine if - * there are more instances left to be queried. + * nextPageToken google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token + * to determine if there are more instances left to be queried. */ // const pageSize = 1234 /** * The `nextPageToken` value returned from a previous - * azureClusters.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters request, if any. + * azureClusters.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters + * request, if any. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_node_pools.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_node_pools.js index c53e82179d5..56cf39e548d 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_node_pools.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.list_azure_node_pools.js @@ -42,13 +42,14 @@ function main(parent) { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * nextPageToken google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token to determine if - * there are more instances left to be queried. + * nextPageToken google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token + * to determine if there are more instances left to be queried. */ // const pageSize = 1234 /** * The `nextPageToken` value returned from a previous - * azureNodePools.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools request, if any. + * azureNodePools.list google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools + * request, if any. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.update_azure_cluster.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.update_azure_cluster.js index ddcd9be6d39..53c0359317d 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.update_azure_cluster.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.update_azure_cluster.js @@ -29,7 +29,8 @@ function main(azureCluster, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The AzureCluster google.cloud.gkemulticloud.v1.AzureCluster resource to update. + * Required. The AzureCluster google.cloud.gkemulticloud.v1.AzureCluster + * resource to update. */ // const azureCluster = {} /** @@ -41,13 +42,18 @@ function main(azureCluster, updateMask) { * this field. The elements of the repeated paths field can only include these * fields from AzureCluster google.cloud.gkemulticloud.v1.AzureCluster: * * `description`. - * * `annotations`. * * `azureClient`. * * `control_plane.version`. * * `control_plane.vm_size`. + * * `annotations`. * * `authorization.admin_users`. * * `control_plane.root_volume.size_gib`. - * * `logging_config` + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. */ // const updateMask = {} diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.update_azure_node_pool.js b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.update_azure_node_pool.js index 5f6613a3921..1cd909bbc2e 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.update_azure_node_pool.js +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/azure_clusters.update_azure_node_pool.js @@ -29,7 +29,8 @@ function main(azureNodePool, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool resource to update. + * Required. The AzureNodePool google.cloud.gkemulticloud.v1.AzureNodePool + * resource to update. */ // const azureNodePool = {} /** @@ -44,7 +45,7 @@ function main(azureNodePool, updateMask) { * * `version`. * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. - * * `config.vm_size`. + * * `config.ssh_config.authorized_key`. */ // const updateMask = {} diff --git a/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json b/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json index 0fcf6171a95..701bdf6ad51 100644 --- a/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json +++ b/packages/google-cloud-gkemulticloud/samples/generated/v1/snippet_metadata.google.cloud.gkemulticloud.v1.json @@ -11,9 +11,397 @@ ] }, "snippets": [ + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async", + "title": "AttachedClusters createAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "attached_clusters.create_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedCluster", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "attached_cluster", + "type": ".google.cloud.gkemulticloud.v1.AttachedCluster" + }, + { + "name": "attached_cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "CreateAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async", + "title": "AttachedClusters updateAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Updates an [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].", + "canonical": true, + "file": "attached_clusters.update_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedCluster", + "async": true, + "parameters": [ + { + "name": "attached_cluster", + "type": ".google.cloud.gkemulticloud.v1.AttachedCluster" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "UpdateAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async", + "title": "AttachedClusters importAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Imports creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource by importing an existing Fleet Membership resource. Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "attached_clusters.import_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedCluster", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "fleet_membership", + "type": "TYPE_STRING" + }, + { + "name": "platform_version", + "type": "TYPE_STRING" + }, + { + "name": "distribution", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "ImportAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async", + "title": "AttachedClusters getAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Describes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.", + "canonical": true, + "file": "attached_clusters.get_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AttachedCluster", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "GetAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async", + "title": "AttachedClusters listAttachedClusters Sample", + "origin": "API_DEFINITION", + "description": " Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources on a given Google Cloud project and region.", + "canonical": true, + "file": "attached_clusters.list_attached_clusters.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.ListAttachedClustersResponse", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "ListAttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async", + "title": "AttachedClusters deleteAttachedCluster Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", + "canonical": true, + "file": "attached_clusters.delete_attached_cluster.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedCluster", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "ignore_errors", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "DeleteAttachedCluster", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedCluster", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async", + "title": "AttachedClusters getAttachedServerConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns information, such as supported Kubernetes versions, on a given Google Cloud location.", + "canonical": true, + "file": "attached_clusters.get_attached_server_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAttachedServerConfig", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.AttachedServerConfig", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "GetAttachedServerConfig", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, + { + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async", + "title": "AttachedClusters generateAttachedClusterInstallManifest Sample", + "origin": "API_DEFINITION", + "description": " Generates the install manifest to be installed on the target cluster.", + "canonical": true, + "file": "attached_clusters.generate_attached_cluster_install_manifest.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateAttachedClusterInstallManifest", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifest", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "attached_cluster_id", + "type": "TYPE_STRING" + }, + { + "name": "platform_version", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse", + "client": { + "shortName": "AttachedClustersClient", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClustersClient" + }, + "method": { + "shortName": "GenerateAttachedClusterInstallManifest", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifest", + "service": { + "shortName": "AttachedClusters", + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters" + } + } + } + }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async", - "title": "AwsClusters createAwsCluster Sample", + "title": "AttachedClusters createAwsCluster Sample", "origin": "API_DEFINITION", "description": " Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -22,7 +410,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -65,7 +453,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async", - "title": "AwsClusters updateAwsCluster Sample", + "title": "AttachedClusters updateAwsCluster Sample", "origin": "API_DEFINITION", "description": " Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].", "canonical": true, @@ -74,7 +462,7 @@ "segments": [ { "start": 25, - "end": 85, + "end": 89, "type": "FULL" } ], @@ -113,7 +501,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async", - "title": "AwsClusters getAwsCluster Sample", + "title": "AttachedClusters getAwsCluster Sample", "origin": "API_DEFINITION", "description": " Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.", "canonical": true, @@ -122,7 +510,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], @@ -153,7 +541,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async", - "title": "AwsClusters listAwsClusters Sample", + "title": "AttachedClusters listAwsClusters Sample", "origin": "API_DEFINITION", "description": " Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google Cloud project and region.", "canonical": true, @@ -162,7 +550,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 74, "type": "FULL" } ], @@ -201,7 +589,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async", - "title": "AwsClusters deleteAwsCluster Sample", + "title": "AttachedClusters deleteAwsCluster Sample", "origin": "API_DEFINITION", "description": " Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource. Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -210,7 +598,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -253,7 +641,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async", - "title": "AwsClusters generateAwsAccessToken Sample", + "title": "AttachedClusters generateAwsAccessToken Sample", "origin": "API_DEFINITION", "description": " Generates a short-lived access token to authenticate to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.", "canonical": true, @@ -262,7 +650,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], @@ -293,7 +681,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async", - "title": "AwsClusters createAwsNodePool Sample", + "title": "AttachedClusters createAwsNodePool Sample", "origin": "API_DEFINITION", "description": " Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -302,7 +690,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -345,7 +733,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async", - "title": "AwsClusters updateAwsNodePool Sample", + "title": "AttachedClusters updateAwsNodePool Sample", "origin": "API_DEFINITION", "description": " Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].", "canonical": true, @@ -354,7 +742,7 @@ "segments": [ { "start": 25, - "end": 80, + "end": 88, "type": "FULL" } ], @@ -393,7 +781,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async", - "title": "AwsClusters getAwsNodePool Sample", + "title": "AttachedClusters getAwsNodePool Sample", "origin": "API_DEFINITION", "description": " Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.", "canonical": true, @@ -402,7 +790,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], @@ -433,7 +821,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async", - "title": "AwsClusters listAwsNodePools Sample", + "title": "AttachedClusters listAwsNodePools Sample", "origin": "API_DEFINITION", "description": " Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].", "canonical": true, @@ -442,7 +830,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 75, "type": "FULL" } ], @@ -481,7 +869,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async", - "title": "AwsClusters deleteAwsNodePool Sample", + "title": "AttachedClusters deleteAwsNodePool Sample", "origin": "API_DEFINITION", "description": " Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -490,7 +878,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -533,7 +921,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async", - "title": "AwsClusters getAwsServerConfig Sample", + "title": "AttachedClusters getAwsServerConfig Sample", "origin": "API_DEFINITION", "description": " Returns information, such as supported AWS regions and Kubernetes versions, on a given Google Cloud location.", "canonical": true, @@ -542,7 +930,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], @@ -573,7 +961,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async", - "title": "AwsClusters createAzureClient Sample", + "title": "AttachedClusters createAzureClient Sample", "origin": "API_DEFINITION", "description": " Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given Google Cloud project and region. `AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -582,7 +970,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -625,7 +1013,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async", - "title": "AwsClusters getAzureClient Sample", + "title": "AttachedClusters getAzureClient Sample", "origin": "API_DEFINITION", "description": " Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.", "canonical": true, @@ -634,7 +1022,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -665,7 +1053,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async", - "title": "AwsClusters listAzureClients Sample", + "title": "AttachedClusters listAzureClients Sample", "origin": "API_DEFINITION", "description": " Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google Cloud project and region.", "canonical": true, @@ -674,7 +1062,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 74, "type": "FULL" } ], @@ -713,7 +1101,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async", - "title": "AwsClusters deleteAzureClient Sample", + "title": "AttachedClusters deleteAzureClient Sample", "origin": "API_DEFINITION", "description": " Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource. If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -722,7 +1110,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -761,7 +1149,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async", - "title": "AwsClusters createAzureCluster Sample", + "title": "AttachedClusters createAzureCluster Sample", "origin": "API_DEFINITION", "description": " Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given GCP project and region. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -770,7 +1158,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -813,7 +1201,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async", - "title": "AwsClusters updateAzureCluster Sample", + "title": "AttachedClusters updateAzureCluster Sample", "origin": "API_DEFINITION", "description": " Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].", "canonical": true, @@ -822,7 +1210,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 79, "type": "FULL" } ], @@ -861,7 +1249,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async", - "title": "AwsClusters getAzureCluster Sample", + "title": "AttachedClusters getAzureCluster Sample", "origin": "API_DEFINITION", "description": " Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.", "canonical": true, @@ -870,7 +1258,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], @@ -901,7 +1289,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async", - "title": "AwsClusters listAzureClusters Sample", + "title": "AttachedClusters listAzureClusters Sample", "origin": "API_DEFINITION", "description": " Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given Google Cloud project and region.", "canonical": true, @@ -910,7 +1298,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 74, "type": "FULL" } ], @@ -949,7 +1337,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async", - "title": "AwsClusters deleteAzureCluster Sample", + "title": "AttachedClusters deleteAzureCluster Sample", "origin": "API_DEFINITION", "description": " Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource. Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -958,7 +1346,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -1001,7 +1389,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async", - "title": "AwsClusters generateAzureAccessToken Sample", + "title": "AttachedClusters generateAzureAccessToken Sample", "origin": "API_DEFINITION", "description": " Generates a short-lived access token to authenticate to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.", "canonical": true, @@ -1010,7 +1398,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], @@ -1041,7 +1429,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async", - "title": "AwsClusters createAzureNodePool Sample", + "title": "AttachedClusters createAzureNodePool Sample", "origin": "API_DEFINITION", "description": " Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -1050,7 +1438,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -1093,7 +1481,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async", - "title": "AwsClusters updateAzureNodePool Sample", + "title": "AttachedClusters updateAzureNodePool Sample", "origin": "API_DEFINITION", "description": " Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].", "canonical": true, @@ -1102,7 +1490,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 71, "type": "FULL" } ], @@ -1141,7 +1529,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async", - "title": "AwsClusters getAzureNodePool Sample", + "title": "AttachedClusters getAzureNodePool Sample", "origin": "API_DEFINITION", "description": " Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.", "canonical": true, @@ -1150,7 +1538,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], @@ -1181,7 +1569,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async", - "title": "AwsClusters listAzureNodePools Sample", + "title": "AttachedClusters listAzureNodePools Sample", "origin": "API_DEFINITION", "description": " Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].", "canonical": true, @@ -1190,7 +1578,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 75, "type": "FULL" } ], @@ -1229,7 +1617,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async", - "title": "AwsClusters deleteAzureNodePool Sample", + "title": "AttachedClusters deleteAzureNodePool Sample", "origin": "API_DEFINITION", "description": " Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource. If successful, the response contains a newly created [Operation][google.longrunning.Operation] resource that can be described to track the status of the operation.", "canonical": true, @@ -1238,7 +1626,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 81, "type": "FULL" } ], @@ -1281,7 +1669,7 @@ }, { "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async", - "title": "AwsClusters getAzureServerConfig Sample", + "title": "AttachedClusters getAzureServerConfig Sample", "origin": "API_DEFINITION", "description": " Returns information, such as supported Azure regions and Kubernetes versions, on a given Google Cloud location.", "canonical": true, @@ -1290,7 +1678,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 59, "type": "FULL" } ], diff --git a/packages/google-cloud-gkemulticloud/src/index.ts b/packages/google-cloud-gkemulticloud/src/index.ts index 9d00861c636..f49f58bde74 100644 --- a/packages/google-cloud-gkemulticloud/src/index.ts +++ b/packages/google-cloud-gkemulticloud/src/index.ts @@ -18,12 +18,19 @@ import * as v1 from './v1'; +const AttachedClustersClient = v1.AttachedClustersClient; +type AttachedClustersClient = v1.AttachedClustersClient; const AwsClustersClient = v1.AwsClustersClient; type AwsClustersClient = v1.AwsClustersClient; const AzureClustersClient = v1.AzureClustersClient; type AzureClustersClient = v1.AzureClustersClient; -export {v1, AwsClustersClient, AzureClustersClient}; -export default {v1, AwsClustersClient, AzureClustersClient}; +export {v1, AttachedClustersClient, AwsClustersClient, AzureClustersClient}; +export default { + v1, + AttachedClustersClient, + AwsClustersClient, + AzureClustersClient, +}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client.ts b/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client.ts new file mode 100644 index 00000000000..80797ee9584 --- /dev/null +++ b/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client.ts @@ -0,0 +1,2436 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/attached_clusters_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './attached_clusters_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The AttachedClusters API provides a single centrally managed service + * to register and manage Anthos attached clusters that run on customer's owned + * infrastructure. + * @class + * @memberof v1 + */ +export class AttachedClustersClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + attachedClustersStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AttachedClustersClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new AttachedClustersClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof AttachedClustersClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + attachedClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' + ), + attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedServerConfig' + ), + awsClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' + ), + awsNodePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}/awsNodePools/{aws_node_pool}' + ), + awsServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/awsServerConfig' + ), + azureClientPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClients/{azure_client}' + ), + azureClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}' + ), + azureNodePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureClusters/{azure_cluster}/azureNodePools/{azure_node_pool}' + ), + azureServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/azureServerConfig' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listAttachedClusters: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'attachedClusters' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=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 createAttachedClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AttachedCluster' + ) as gax.protobuf.Type; + const createAttachedClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateAttachedClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AttachedCluster' + ) as gax.protobuf.Type; + const updateAttachedClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata' + ) as gax.protobuf.Type; + const importAttachedClusterResponse = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.AttachedCluster' + ) as gax.protobuf.Type; + const importAttachedClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteAttachedClusterResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteAttachedClusterMetadata = protoFilesRoot.lookup( + '.google.cloud.gkemulticloud.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAttachedCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAttachedClusterResponse.decode.bind( + createAttachedClusterResponse + ), + createAttachedClusterMetadata.decode.bind(createAttachedClusterMetadata) + ), + updateAttachedCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAttachedClusterResponse.decode.bind( + updateAttachedClusterResponse + ), + updateAttachedClusterMetadata.decode.bind(updateAttachedClusterMetadata) + ), + importAttachedCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importAttachedClusterResponse.decode.bind( + importAttachedClusterResponse + ), + importAttachedClusterMetadata.decode.bind(importAttachedClusterMetadata) + ), + deleteAttachedCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAttachedClusterResponse.decode.bind( + deleteAttachedClusterResponse + ), + deleteAttachedClusterMetadata.decode.bind(deleteAttachedClusterMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.gkemulticloud.v1.AttachedClusters', + 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.attachedClustersStub) { + return this.attachedClustersStub; + } + + // Put together the "service stub" for + // google.cloud.gkemulticloud.v1.AttachedClusters. + this.attachedClustersStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.gkemulticloud.v1.AttachedClusters' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.gkemulticloud.v1.AttachedClusters, + 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 attachedClustersStubMethods = [ + 'createAttachedCluster', + 'updateAttachedCluster', + 'importAttachedCluster', + 'getAttachedCluster', + 'listAttachedClusters', + 'deleteAttachedCluster', + 'getAttachedServerConfig', + 'generateAttachedClusterInstallManifest', + ]; + for (const methodName of attachedClustersStubMethods) { + const callPromise = this.attachedClustersStub.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.attachedClustersStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'gkemulticloud.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 'gkemulticloud.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 -- + // ------------------- + /** + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * to describe. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.get_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async + */ + getAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + ( + | protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest + | undefined + ), + {} | undefined + ] + >; + getAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + | protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + | protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + | protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + | protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + ( + | protos.google.cloud.gkemulticloud.v1.IGetAttachedClusterRequest + | 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.getAttachedCluster(request, options, callback); + } + /** + * Returns information, such as supported Kubernetes versions, on a given + * Google Cloud location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AttachedServerConfig|AttachedServerConfig} + * resource to describe. + * + * `AttachedServerConfig` names are formatted as + * `projects//locations//attachedServerConfig`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [AttachedServerConfig]{@link google.cloud.gkemulticloud.v1.AttachedServerConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.get_attached_server_config.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async + */ + getAttachedServerConfig( + request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + ( + | protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest + | undefined + ), + {} | undefined + ] + >; + getAttachedServerConfig( + request: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + | protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAttachedServerConfig( + request: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + | protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAttachedServerConfig( + request?: protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + | protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + | protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig, + ( + | protos.google.cloud.gkemulticloud.v1.IGetAttachedServerConfigRequest + | 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.getAttachedServerConfig( + request, + options, + callback + ); + } + /** + * Generates the install manifest to be installed on the target cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {string} request.attachedClusterId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * + * When generating an install manifest for importing an existing Membership + * resource, the attached_cluster_id field must be the Membership id. + * + * Membership names are formatted as `resource name formatted as + * `projects//locations//memberships/`. + * @param {string} request.platformVersion + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig|GetAttachedServerConfig}. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [GenerateAttachedClusterInstallManifestResponse]{@link google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.generate_attached_cluster_install_manifest.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async + */ + generateAttachedClusterInstallManifest( + request?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + ( + | protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest + | undefined + ), + {} | undefined + ] + >; + generateAttachedClusterInstallManifest( + request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + | protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateAttachedClusterInstallManifest( + request: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, + callback: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + | protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateAttachedClusterInstallManifest( + request?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + | protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + | protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse, + ( + | protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestRequest + | 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.generateAttachedClusterInstallManifest( + request, + options, + callback + ); + } + + /** + * Creates a new + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * on a given GCP project and region. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {google.cloud.gkemulticloud.v1.AttachedCluster} request.attachedCluster + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} to create. + * @param {string} request.attachedClusterId + * Required. A client provided ID the resource. Must be unique within the + * parent resource. + * + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * name formatted as + * `projects//locations//attachedClusters/`. + * + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually create the cluster. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.create_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async + */ + createAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, + callback: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.ICreateAttachedClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.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.createAttachedCluster(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createAttachedCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.create_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async + */ + async checkCreateAttachedClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.gkemulticloud.v1.AttachedCluster, + protos.google.cloud.gkemulticloud.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.createAttachedCluster, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.gkemulticloud.v1.AttachedCluster, + protos.google.cloud.gkemulticloud.v1.OperationMetadata + >; + } + /** + * Updates an + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkemulticloud.v1.AttachedCluster} request.attachedCluster + * Required. The + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * to update. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually update the cluster. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field can only include these + * fields from + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}: + * + * * `description`. + * * `annotations`. + * * `platform_version`. + * * `authorization.admin_users`. + * * `logging_config.component_config.enable_components`. + * * `monitoring_config.managed_prometheus_config.enabled`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.update_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async + */ + updateAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, + callback: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IUpdateAttachedClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.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({ + 'attached_cluster.name': request.attachedCluster!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAttachedCluster(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateAttachedCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.update_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async + */ + async checkUpdateAttachedClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.gkemulticloud.v1.AttachedCluster, + protos.google.cloud.gkemulticloud.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.updateAttachedCluster, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.gkemulticloud.v1.AttachedCluster, + protos.google.cloud.gkemulticloud.v1.OperationMetadata + >; + } + /** + * Imports creates a new + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * by importing an existing Fleet Membership resource. + * + * Attached Clusters created before the introduction of the Anthos Multi-Cloud + * API can be imported through this method. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * will be created. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on Google Cloud resource names. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually import the cluster. + * @param {string} request.fleetMembership + * Required. The name of the fleet membership resource to import. + * @param {string} request.platformVersion + * Required. The platform version for the cluster (e.g. `1.19.0-gke.1000`). + * + * You can list all supported versions on a given Google Cloud region by + * calling + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig|GetAttachedServerConfig}. + * @param {string} request.distribution + * Required. The Kubernetes distribution of the underlying attached cluster. + * + * Supported values: ["eks", "aks"]. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.import_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async + */ + importAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + importAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, + callback: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IImportAttachedClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.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.importAttachedCluster(request, options, callback); + } + /** + * Check the status of the long running operation returned by `importAttachedCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.import_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async + */ + async checkImportAttachedClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.gkemulticloud.v1.AttachedCluster, + protos.google.cloud.gkemulticloud.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.importAttachedCluster, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.gkemulticloud.v1.AttachedCluster, + protos.google.cloud.gkemulticloud.v1.OperationMetadata + >; + } + /** + * Deletes a specific + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource. + * + * If successful, the response contains a newly created + * {@link google.longrunning.Operation|Operation} resource that can be + * described to track the status of the operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} to delete. + * + * `AttachedCluster` names are formatted as + * `projects//locations//attachedClusters/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {boolean} request.validateOnly + * If set, only validate the request, but do not actually delete the resource. + * @param {boolean} request.allowMissing + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * is not found, the request will succeed but no action will be taken on the + * server and a completed {@link google.longrunning.Operation|Operation} will be + * returned. + * + * Useful for idempotent deletion. + * @param {boolean} request.ignoreErrors + * If set to true, the deletion of + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resource + * will succeed even if errors occur during deleting in cluster resources. + * Using this parameter may result in orphaned resources in the cluster. + * @param {string} request.etag + * The current etag of the + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster}. + * + * Allows clients to perform deletions through optimistic concurrency control. + * + * If the provided etag does not match the current etag of the cluster, + * the request will fail and an ABORTED error will be returned. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.delete_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async + */ + deleteAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAttachedCluster( + request: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAttachedCluster( + request?: protos.google.cloud.gkemulticloud.v1.IDeleteAttachedClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.gkemulticloud.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.deleteAttachedCluster(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteAttachedCluster()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.delete_attached_cluster.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async + */ + async checkDeleteAttachedClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.gkemulticloud.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.deleteAttachedCluster, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.gkemulticloud.v1.OperationMetadata + >; + } + /** + * Lists all {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} + * resources on a given Google Cloud project and region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. + * 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 `listAttachedClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAttachedClusters( + request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.gkemulticloud.v1.IAttachedCluster[], + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest | null, + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse + ] + >; + listAttachedClusters( + request: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + | protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse + | null + | undefined, + protos.google.cloud.gkemulticloud.v1.IAttachedCluster + > + ): void; + listAttachedClusters( + request: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + callback: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + | protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse + | null + | undefined, + protos.google.cloud.gkemulticloud.v1.IAttachedCluster + > + ): void; + listAttachedClusters( + request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + | protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse + | null + | undefined, + protos.google.cloud.gkemulticloud.v1.IAttachedCluster + >, + callback?: PaginationCallback< + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + | protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse + | null + | undefined, + protos.google.cloud.gkemulticloud.v1.IAttachedCluster + > + ): Promise< + [ + protos.google.cloud.gkemulticloud.v1.IAttachedCluster[], + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest | null, + protos.google.cloud.gkemulticloud.v1.IListAttachedClustersResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } 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.listAttachedClusters(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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster} 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 `listAttachedClustersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAttachedClustersStream( + request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + 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['listAttachedClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAttachedClusters.createStream( + this.innerApiCalls.listAttachedClusters as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAttachedClusters`, 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 location which owns this collection of + * {@link google.cloud.gkemulticloud.v1.AttachedCluster|AttachedCluster} resources. + * + * Location names are formatted as `projects//locations/`. + * + * See [Resource Names](https://cloud.google.com/apis/design/resource_names) + * for more details on GCP resource names. + * @param {number} request.pageSize + * The maximum number of items to return. + * + * If not specified, a default value of 50 will be used by the service. + * Regardless of the pageSize value, the response can include a partial list + * and a caller should only rely on response's + * {@link google.cloud.gkemulticloud.v1.ListAttachedClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. + * @param {string} request.pageToken + * The `nextPageToken` value returned from a previous + * {@link google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters|attachedClusters.list} + * request, if any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AttachedCluster]{@link google.cloud.gkemulticloud.v1.AttachedCluster}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/attached_clusters.list_attached_clusters.js + * region_tag:gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async + */ + listAttachedClustersAsync( + request?: protos.google.cloud.gkemulticloud.v1.IListAttachedClustersRequest, + 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['listAttachedClusters']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAttachedClusters.asyncIterate( + this.innerApiCalls['listAttachedClusters'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * 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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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. + * + * @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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} attached_cluster + * @returns {string} Resource name string. + */ + attachedClusterPath( + project: string, + location: string, + attachedCluster: string + ) { + return this.pathTemplates.attachedClusterPathTemplate.render({ + project: project, + location: location, + attached_cluster: attachedCluster, + }); + } + + /** + * Parse the project from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).project; + } + + /** + * Parse the location from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).location; + } + + /** + * Parse the attached_cluster from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the attached_cluster. + */ + matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).attached_cluster; + } + + /** + * Return a fully-qualified attachedServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + attachedServerConfigPath(project: string, location: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match( + attachedServerConfigName + ).project; + } + + /** + * Parse the location from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match( + attachedServerConfigName + ).location; + } + + /** + * Return a fully-qualified awsCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aws_cluster + * @returns {string} Resource name string. + */ + awsClusterPath(project: string, location: string, awsCluster: string) { + return this.pathTemplates.awsClusterPathTemplate.render({ + project: project, + location: location, + aws_cluster: awsCluster, + }); + } + + /** + * Parse the project from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName) + .project; + } + + /** + * Parse the location from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName) + .location; + } + + /** + * Parse the aws_cluster from AwsCluster resource. + * + * @param {string} awsClusterName + * A fully-qualified path representing AwsCluster resource. + * @returns {string} A string representing the aws_cluster. + */ + matchAwsClusterFromAwsClusterName(awsClusterName: string) { + return this.pathTemplates.awsClusterPathTemplate.match(awsClusterName) + .aws_cluster; + } + + /** + * Return a fully-qualified awsNodePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} aws_cluster + * @param {string} aws_node_pool + * @returns {string} Resource name string. + */ + awsNodePoolPath( + project: string, + location: string, + awsCluster: string, + awsNodePool: string + ) { + return this.pathTemplates.awsNodePoolPathTemplate.render({ + project: project, + location: location, + aws_cluster: awsCluster, + aws_node_pool: awsNodePool, + }); + } + + /** + * Parse the project from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName) + .project; + } + + /** + * Parse the location from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName) + .location; + } + + /** + * Parse the aws_cluster from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the aws_cluster. + */ + matchAwsClusterFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName) + .aws_cluster; + } + + /** + * Parse the aws_node_pool from AwsNodePool resource. + * + * @param {string} awsNodePoolName + * A fully-qualified path representing AwsNodePool resource. + * @returns {string} A string representing the aws_node_pool. + */ + matchAwsNodePoolFromAwsNodePoolName(awsNodePoolName: string) { + return this.pathTemplates.awsNodePoolPathTemplate.match(awsNodePoolName) + .aws_node_pool; + } + + /** + * Return a fully-qualified awsServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + awsServerConfigPath(project: string, location: string) { + return this.pathTemplates.awsServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AwsServerConfig resource. + * + * @param {string} awsServerConfigName + * A fully-qualified path representing AwsServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAwsServerConfigName(awsServerConfigName: string) { + return this.pathTemplates.awsServerConfigPathTemplate.match( + awsServerConfigName + ).project; + } + + /** + * Parse the location from AwsServerConfig resource. + * + * @param {string} awsServerConfigName + * A fully-qualified path representing AwsServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAwsServerConfigName(awsServerConfigName: string) { + return this.pathTemplates.awsServerConfigPathTemplate.match( + awsServerConfigName + ).location; + } + + /** + * Return a fully-qualified azureClient resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_client + * @returns {string} Resource name string. + */ + azureClientPath(project: string, location: string, azureClient: string) { + return this.pathTemplates.azureClientPathTemplate.render({ + project: project, + location: location, + azure_client: azureClient, + }); + } + + /** + * Parse the project from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName) + .project; + } + + /** + * Parse the location from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName) + .location; + } + + /** + * Parse the azure_client from AzureClient resource. + * + * @param {string} azureClientName + * A fully-qualified path representing AzureClient resource. + * @returns {string} A string representing the azure_client. + */ + matchAzureClientFromAzureClientName(azureClientName: string) { + return this.pathTemplates.azureClientPathTemplate.match(azureClientName) + .azure_client; + } + + /** + * Return a fully-qualified azureCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_cluster + * @returns {string} Resource name string. + */ + azureClusterPath(project: string, location: string, azureCluster: string) { + return this.pathTemplates.azureClusterPathTemplate.render({ + project: project, + location: location, + azure_cluster: azureCluster, + }); + } + + /** + * Parse the project from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName) + .project; + } + + /** + * Parse the location from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName) + .location; + } + + /** + * Parse the azure_cluster from AzureCluster resource. + * + * @param {string} azureClusterName + * A fully-qualified path representing AzureCluster resource. + * @returns {string} A string representing the azure_cluster. + */ + matchAzureClusterFromAzureClusterName(azureClusterName: string) { + return this.pathTemplates.azureClusterPathTemplate.match(azureClusterName) + .azure_cluster; + } + + /** + * Return a fully-qualified azureNodePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} azure_cluster + * @param {string} azure_node_pool + * @returns {string} Resource name string. + */ + azureNodePoolPath( + project: string, + location: string, + azureCluster: string, + azureNodePool: string + ) { + return this.pathTemplates.azureNodePoolPathTemplate.render({ + project: project, + location: location, + azure_cluster: azureCluster, + azure_node_pool: azureNodePool, + }); + } + + /** + * Parse the project from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName) + .project; + } + + /** + * Parse the location from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName) + .location; + } + + /** + * Parse the azure_cluster from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the azure_cluster. + */ + matchAzureClusterFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName) + .azure_cluster; + } + + /** + * Parse the azure_node_pool from AzureNodePool resource. + * + * @param {string} azureNodePoolName + * A fully-qualified path representing AzureNodePool resource. + * @returns {string} A string representing the azure_node_pool. + */ + matchAzureNodePoolFromAzureNodePoolName(azureNodePoolName: string) { + return this.pathTemplates.azureNodePoolPathTemplate.match(azureNodePoolName) + .azure_node_pool; + } + + /** + * Return a fully-qualified azureServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + azureServerConfigPath(project: string, location: string) { + return this.pathTemplates.azureServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AzureServerConfig resource. + * + * @param {string} azureServerConfigName + * A fully-qualified path representing AzureServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAzureServerConfigName(azureServerConfigName: string) { + return this.pathTemplates.azureServerConfigPathTemplate.match( + azureServerConfigName + ).project; + } + + /** + * Parse the location from AzureServerConfig resource. + * + * @param {string} azureServerConfigName + * A fully-qualified path representing AzureServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAzureServerConfigName(azureServerConfigName: string) { + return this.pathTemplates.azureServerConfigPathTemplate.match( + azureServerConfigName + ).location; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * 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.attachedClustersStub && !this._terminated) { + return this.attachedClustersStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client_config.json b/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client_config.json similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_client_config.json rename to packages/google-cloud-gkemulticloud/src/v1/attached_clusters_client_config.json diff --git a/owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_proto_list.json b/packages/google-cloud-gkemulticloud/src/v1/attached_clusters_proto_list.json similarity index 100% rename from owl-bot-staging/google-cloud-gkemulticloud/v1/src/v1/attached_clusters_proto_list.json rename to packages/google-cloud-gkemulticloud/src/v1/attached_clusters_proto_list.json diff --git a/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_client.ts b/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_client.ts index 4525a35dc47..2f492ac90c7 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_client.ts +++ b/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_client.ts @@ -179,6 +179,12 @@ export class AwsClustersClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + attachedClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' + ), + attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedServerConfig' + ), awsClusterPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' ), @@ -476,12 +482,15 @@ export class AwsClustersClient { // -- Service calls -- // ------------------- /** - * Describes a specific {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource. + * Describes a specific {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to describe. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to + * describe. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. @@ -579,7 +588,9 @@ export class AwsClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.awsCluster - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to authenticate to. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to + * authenticate to. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. @@ -681,12 +692,15 @@ export class AwsClustersClient { ); } /** - * Describes a specific {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource. + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource to describe. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource to + * describe. * * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. @@ -784,7 +798,9 @@ export class AwsClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AwsServerConfig|AwsServerConfig} resource to describe. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AwsServerConfig|AwsServerConfig} resource + * to describe. * * `AwsServerConfig` names are formatted as * `projects//locations//awsServerConfig`. @@ -883,7 +899,8 @@ export class AwsClustersClient { } /** - * Creates a new {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource on a given GCP project and region. + * Creates a new {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource on a given GCP project and region. * * If successful, the response contains a newly created * {@link google.longrunning.Operation|Operation} resource that can be @@ -892,24 +909,27 @@ export class AwsClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent location where this {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource - * will be created. + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource will be + * created. * * Location names are formatted as `projects//locations/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @param {google.cloud.gkemulticloud.v1.AwsCluster} request.awsCluster - * Required. The specification of the {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} to create. + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} to create. * @param {string} request.awsClusterId - * Required. A client provided ID the resource. Must be unique within the parent - * resource. + * Required. A client provided ID the resource. Must be unique within the + * parent resource. * - * The provided ID will be part of the {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} - * resource name formatted as + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource name + * formatted as * `projects//locations//awsClusters/`. * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 40 characters. + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually create the cluster. * @param {object} [options] @@ -1049,7 +1069,8 @@ export class AwsClustersClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.gkemulticloud.v1.AwsCluster} request.awsCluster - * Required. The {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource to update. + * Required. The {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource to update. * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually update the cluster. * @param {google.protobuf.FieldMask} request.updateMask @@ -1069,14 +1090,17 @@ export class AwsClustersClient { * * `control_plane.proxy_config`. * * `control_plane.proxy_config.secret_arn`. * * `control_plane.proxy_config.secret_version`. + * * `control_plane.root_volume.size_gib`. + * * `control_plane.root_volume.volume_type`. * * `control_plane.root_volume.iops`. * * `control_plane.root_volume.kms_key_arn`. - * * `control_plane.root_volume.volume_type`. - * * `control_plane.root_volume.size_gib`. * * `control_plane.ssh_config`. * * `control_plane.ssh_config.ec2_key_pair`. * * `control_plane.instance_placement.tenancy`. - * * `logging_config`. + * * `control_plane.iam_instance_profile`. + * * `logging_config.component_config.enable_components`. + * * `control_plane.tags`. + * * `monitoring_config.managed_prometheus_config.enabled`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1209,10 +1233,11 @@ export class AwsClustersClient { >; } /** - * Deletes a specific {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource. + * Deletes a specific {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource. * - * Fails if the cluster has one or more associated {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} - * resources. + * Fails if the cluster has one or more associated + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources. * * If successful, the response contains a newly created * {@link google.longrunning.Operation|Operation} resource that can be @@ -1221,7 +1246,8 @@ export class AwsClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name the {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} to delete. + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} to delete. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. @@ -1231,13 +1257,15 @@ export class AwsClustersClient { * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually delete the resource. * @param {boolean} request.allowMissing - * If set to true, and the {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed {@link google.longrunning.Operation|Operation} will be returned. + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed {@link google.longrunning.Operation|Operation} will be returned. * * Useful for idempotent deletion. * @param {string} request.etag - * The current etag of the {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. + * The current etag of the + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. * * Allows clients to perform deletions through optimistic concurrency control. * @@ -1375,7 +1403,8 @@ export class AwsClustersClient { >; } /** - * Creates a new {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}, attached to a given {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. + * Creates a new {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}, + * attached to a given {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. * * If successful, the response contains a newly created * {@link google.longrunning.Operation|Operation} resource that can be @@ -1384,7 +1413,8 @@ export class AwsClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resource where this node pool will be created. + * Required. The {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} + * resource where this node pool will be created. * * `AwsCluster` names are formatted as * `projects//locations//awsClusters/`. @@ -1392,16 +1422,18 @@ export class AwsClustersClient { * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @param {google.cloud.gkemulticloud.v1.AwsNodePool} request.awsNodePool - * Required. The specification of the {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} to create. + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} to create. * @param {string} request.awsNodePoolId - * Required. A client provided ID the resource. Must be unique within the parent - * resource. + * Required. A client provided ID the resource. Must be unique within the + * parent resource. * - * The provided ID will be part of the {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} - * resource name formatted as + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource name + * formatted as * `projects//locations//awsClusters//awsNodePools/`. * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 40 characters. + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually create the node * pool. @@ -1542,7 +1574,8 @@ export class AwsClustersClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.gkemulticloud.v1.AwsNodePool} request.awsNodePool - * Required. The {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource to update. + * Required. The {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} + * resource to update. * @param {boolean} request.validateOnly * If set, only validate the request, but don't actually update the node pool. * @param {google.protobuf.FieldMask} request.updateMask @@ -1565,6 +1598,13 @@ export class AwsClustersClient { * * `config.proxy_config.secret_version`. * * `config.ssh_config`. * * `config.ssh_config.ec2_key_pair`. + * * `config.instance_placement.tenancy`. + * * `config.iam_instance_profile`. + * * `config.labels`. + * * `config.tags`. + * * `config.autoscaling_metrics_collection`. + * * `config.autoscaling_metrics_collection.granularity`. + * * `config.autoscaling_metrics_collection.metrics`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1697,7 +1737,8 @@ export class AwsClustersClient { >; } /** - * Deletes a specific {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource. + * Deletes a specific {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} + * resource. * * If successful, the response contains a newly created * {@link google.longrunning.Operation|Operation} resource that can be @@ -1706,7 +1747,8 @@ export class AwsClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name the {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} to delete. + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} to delete. * * `AwsNodePool` names are formatted as * `projects//locations//awsClusters//awsNodePools/`. @@ -1717,13 +1759,15 @@ export class AwsClustersClient { * If set, only validate the request, but do not actually delete the node * pool. * @param {boolean} request.allowMissing - * If set to true, and the {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed {@link google.longrunning.Operation|Operation} will be returned. + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed {@link google.longrunning.Operation|Operation} will be returned. * * Useful for idempotent deletion. * @param {string} request.etag - * The current ETag of the {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}. + * The current ETag of the + * {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool}. * * Allows clients to perform deletions through optimistic concurrency control. * @@ -1861,8 +1905,8 @@ export class AwsClustersClient { >; } /** - * Lists all {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources on a given Google Cloud project and - * region. + * Lists all {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster} resources + * on a given Google Cloud project and region. * * @param {Object} request * The request object that will be sent. @@ -1880,11 +1924,12 @@ export class AwsClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1991,11 +2036,12 @@ export class AwsClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2050,11 +2096,12 @@ export class AwsClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAwsClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters|awsClusters.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2090,7 +2137,9 @@ export class AwsClustersClient { ) as AsyncIterable; } /** - * Lists all {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} resources on a given {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. + * Lists all {@link google.cloud.gkemulticloud.v1.AwsNodePool|AwsNodePool} + * resources on a given + * {@link google.cloud.gkemulticloud.v1.AwsCluster|AwsCluster}. * * @param {Object} request * The request object that will be sent. @@ -2109,11 +2158,12 @@ export class AwsClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2221,11 +2271,12 @@ export class AwsClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2281,11 +2332,12 @@ export class AwsClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAwsNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools|awsNodePools.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2320,10 +2372,286 @@ export class AwsClustersClient { callSettings ) as AsyncIterable; } + /** + * 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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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. + * + * @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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} attached_cluster + * @returns {string} Resource name string. + */ + attachedClusterPath( + project: string, + location: string, + attachedCluster: string + ) { + return this.pathTemplates.attachedClusterPathTemplate.render({ + project: project, + location: location, + attached_cluster: attachedCluster, + }); + } + + /** + * Parse the project from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).project; + } + + /** + * Parse the location from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).location; + } + + /** + * Parse the attached_cluster from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the attached_cluster. + */ + matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).attached_cluster; + } + + /** + * Return a fully-qualified attachedServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + attachedServerConfigPath(project: string, location: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match( + attachedServerConfigName + ).project; + } + + /** + * Parse the location from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match( + attachedServerConfigName + ).location; + } + /** * Return a fully-qualified awsCluster resource name string. * diff --git a/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_proto_list.json b/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_proto_list.json index b9a247daff1..288ec0e3d51 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_proto_list.json +++ b/packages/google-cloud-gkemulticloud/src/v1/aws_clusters_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/cloud/gkemulticloud/v1/attached_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/attached_service.proto", "../../protos/google/cloud/gkemulticloud/v1/aws_resources.proto", "../../protos/google/cloud/gkemulticloud/v1/aws_service.proto", "../../protos/google/cloud/gkemulticloud/v1/azure_resources.proto", diff --git a/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_client.ts b/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_client.ts index 5d548e45c2e..056ddd30d3b 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_client.ts +++ b/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_client.ts @@ -179,6 +179,12 @@ export class AzureClustersClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + attachedClusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedClusters/{attached_cluster}' + ), + attachedServerConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/attachedServerConfig' + ), awsClusterPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/awsClusters/{aws_cluster}' ), @@ -507,14 +513,18 @@ export class AzureClustersClient { // -- Service calls -- // ------------------- /** - * Describes a specific {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource. + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource to describe. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource to + * describe. * - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} names are formatted as + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} names are + * formatted as * `projects//locations//azureClients/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) @@ -604,12 +614,15 @@ export class AzureClustersClient { return this.innerApiCalls.getAzureClient(request, options, callback); } /** - * Describes a specific {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to describe. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to + * describe. * * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. @@ -707,7 +720,9 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.azureCluster - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to authenticate to. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to + * authenticate to. * * `AzureCluster` names are formatted as * `projects//locations//AzureClusters/`. @@ -809,12 +824,15 @@ export class AzureClustersClient { ); } /** - * Describes a specific {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource. + * Describes a specific + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource to describe. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource to + * describe. * * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. @@ -912,7 +930,9 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the {@link google.cloud.gkemulticloud.v1.AzureServerConfig|AzureServerConfig} resource to describe. + * Required. The name of the + * {@link google.cloud.gkemulticloud.v1.AzureServerConfig|AzureServerConfig} + * resource to describe. * * `AzureServerConfig` names are formatted as * `projects//locations//azureServerConfig`. @@ -1011,8 +1031,8 @@ export class AzureClustersClient { } /** - * Creates a new {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource on a given Google Cloud project - * and region. + * Creates a new {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} + * resource on a given Google Cloud project and region. * * `AzureClient` resources hold client authentication * information needed by the Anthos Multicloud API to manage Azure resources @@ -1025,24 +1045,27 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent location where this {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource - * will be created. + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource will be + * created. * * Location names are formatted as `projects//locations/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @param {google.cloud.gkemulticloud.v1.AzureClient} request.azureClient - * Required. The specification of the {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} to create. + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} to create. * @param {string} request.azureClientId - * Required. A client provided ID the resource. Must be unique within the parent - * resource. + * Required. A client provided ID the resource. Must be unique within the + * parent resource. * - * The provided ID will be part of the {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} - * resource name formatted as + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource name + * formatted as * `projects//locations//azureClients/`. * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 40 characters. + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually create the client. * @param {object} [options] @@ -1177,7 +1200,8 @@ export class AzureClustersClient { >; } /** - * Deletes a specific {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource. + * Deletes a specific {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} + * resource. * * If the client is used by one or more clusters, deletion will * fail and a `FAILED_PRECONDITION` error will be returned. @@ -1189,17 +1213,20 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name the {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} to delete. + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} to delete. * - * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} names are formatted as + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} names are + * formatted as * `projects//locations//azureClients/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @param {boolean} request.allowMissing - * If set to true, and the {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed {@link google.longrunning.Operation|Operation} will be returned. + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed {@link google.longrunning.Operation|Operation} will be returned. * * Useful for idempotent deletion. * @param {boolean} request.validateOnly @@ -1336,7 +1363,8 @@ export class AzureClustersClient { >; } /** - * Creates a new {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource on a given GCP project and region. + * Creates a new {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} + * resource on a given GCP project and region. * * If successful, the response contains a newly created * {@link google.longrunning.Operation|Operation} resource that can be @@ -1345,24 +1373,27 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent location where this {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource - * will be created. + * Required. The parent location where this + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource will be + * created. * * Location names are formatted as `projects//locations/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @param {google.cloud.gkemulticloud.v1.AzureCluster} request.azureCluster - * Required. The specification of the {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} to create. + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} to create. * @param {string} request.azureClusterId - * Required. A client provided ID the resource. Must be unique within the parent - * resource. + * Required. A client provided ID the resource. Must be unique within the + * parent resource. * - * The provided ID will be part of the {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} - * resource name formatted as + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource name + * formatted as * `projects//locations//azureClusters/`. * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 40 characters. + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually create the cluster. * @param {object} [options] @@ -1502,7 +1533,8 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.gkemulticloud.v1.AzureCluster} request.azureCluster - * Required. The {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource to update. + * Required. The {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} + * resource to update. * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually update the cluster. * @param {google.protobuf.FieldMask} request.updateMask @@ -1511,13 +1543,18 @@ export class AzureClustersClient { * fields from {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}: * * * `description`. - * * `annotations`. * * `azureClient`. * * `control_plane.version`. * * `control_plane.vm_size`. + * * `annotations`. * * `authorization.admin_users`. * * `control_plane.root_volume.size_gib`. - * * `logging_config` + * * `control_plane.proxy_config`. + * * `control_plane.proxy_config.resource_group_id`. + * * `control_plane.proxy_config.secret_id`. + * * `control_plane.ssh_config.authorized_key`. + * * `logging_config.component_config.enable_components` + * * `monitoring_config.managed_prometheus_config.enabled`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1650,10 +1687,11 @@ export class AzureClustersClient { >; } /** - * Deletes a specific {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. + * Deletes a specific + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource. * - * Fails if the cluster has one or more associated {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} - * resources. + * Fails if the cluster has one or more associated + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources. * * If successful, the response contains a newly created * {@link google.longrunning.Operation|Operation} resource that can be @@ -1662,7 +1700,8 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name the {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} to delete. + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} to delete. * * `AzureCluster` names are formatted as * `projects//locations//azureClusters/`. @@ -1670,15 +1709,17 @@ export class AzureClustersClient { * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on GCP resource names. * @param {boolean} request.allowMissing - * If set to true, and the {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed {@link google.longrunning.Operation|Operation} will be returned. + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource is not + * found, the request will succeed but no action will be taken on the server + * and a completed {@link google.longrunning.Operation|Operation} will be returned. * * Useful for idempotent deletion. * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually delete the resource. * @param {string} request.etag - * The current etag of the {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. + * The current etag of the + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. * * Allows clients to perform deletions through optimistic concurrency control. * @@ -1816,7 +1857,9 @@ export class AzureClustersClient { >; } /** - * Creates a new {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}, attached to a given {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. + * Creates a new {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}, + * attached to a given + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. * * If successful, the response contains a newly created * {@link google.longrunning.Operation|Operation} resource that can be @@ -1825,23 +1868,26 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resource where this node pool will be created. + * Required. The {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} + * resource where this node pool will be created. * * Location names are formatted as `projects//locations/`. * * See [Resource Names](https://cloud.google.com/apis/design/resource_names) * for more details on Google Cloud resource names. * @param {google.cloud.gkemulticloud.v1.AzureNodePool} request.azureNodePool - * Required. The specification of the {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} to create. + * Required. The specification of the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} to create. * @param {string} request.azureNodePoolId - * Required. A client provided ID the resource. Must be unique within the parent - * resource. + * Required. A client provided ID the resource. Must be unique within the + * parent resource. * - * The provided ID will be part of the {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} - * resource name formatted as + * The provided ID will be part of the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource name + * formatted as * `projects//locations//azureClusters//azureNodePools/`. * - * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 40 characters. + * Valid characters are `/{@link 0-9|a-z}-/`. Cannot be longer than 63 characters. * @param {boolean} request.validateOnly * If set, only validate the request, but do not actually create the node * pool. @@ -1982,7 +2028,8 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.gkemulticloud.v1.AzureNodePool} request.azureNodePool - * Required. The {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource to update. + * Required. The {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} + * resource to update. * @param {boolean} request.validateOnly * If set, only validate the request, but don't actually update the node pool. * @param {google.protobuf.FieldMask} request.updateMask @@ -1994,7 +2041,7 @@ export class AzureClustersClient { * * `version`. * * `autoscaling.min_node_count`. * * `autoscaling.max_node_count`. - * * `config.vm_size`. + * * `config.ssh_config.authorized_key`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2127,7 +2174,8 @@ export class AzureClustersClient { >; } /** - * Deletes a specific {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource. + * Deletes a specific + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource. * * If successful, the response contains a newly created * {@link google.longrunning.Operation|Operation} resource that can be @@ -2136,7 +2184,8 @@ export class AzureClustersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name the {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} to delete. + * Required. The resource name the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} to delete. * * `AzureNodePool` names are formatted as * `projects//locations//azureClusters//azureNodePools/`. @@ -2147,13 +2196,16 @@ export class AzureClustersClient { * If set, only validate the request, but do not actually delete the node * pool. * @param {boolean} request.allowMissing - * If set to true, and the {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource is not found, - * the request will succeed but no action will be taken on the server and a - * completed {@link google.longrunning.Operation|Operation} will be returned. + * If set to true, and the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resource is + * not found, the request will succeed but no action will be taken on the + * server and a completed {@link google.longrunning.Operation|Operation} will be + * returned. * * Useful for idempotent deletion. * @param {string} request.etag - * The current ETag of the {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}. + * The current ETag of the + * {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool}. * * Allows clients to perform deletions through optimistic concurrency control. * @@ -2291,8 +2343,8 @@ export class AzureClustersClient { >; } /** - * Lists all {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} resources on a given Google Cloud project and - * region. + * Lists all {@link google.cloud.gkemulticloud.v1.AzureClient|AzureClient} + * resources on a given Google Cloud project and region. * * @param {Object} request * The request object that will be sent. @@ -2310,11 +2362,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2421,11 +2474,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2480,11 +2534,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureClientsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients|azureClients.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2520,8 +2575,8 @@ export class AzureClustersClient { ) as AsyncIterable; } /** - * Lists all {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} resources on a given Google Cloud project and - * region. + * Lists all {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster} + * resources on a given Google Cloud project and region. * * @param {Object} request * The request object that will be sent. @@ -2539,11 +2594,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2650,11 +2706,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2709,11 +2766,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureClustersResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters|azureClusters.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2749,7 +2807,9 @@ export class AzureClustersClient { ) as AsyncIterable; } /** - * Lists all {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} resources on a given {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. + * Lists all {@link google.cloud.gkemulticloud.v1.AzureNodePool|AzureNodePool} + * resources on a given + * {@link google.cloud.gkemulticloud.v1.AzureCluster|AzureCluster}. * * @param {Object} request * The request object that will be sent. @@ -2768,11 +2828,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2880,11 +2941,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2940,11 +3002,12 @@ export class AzureClustersClient { * If not specified, a default value of 50 will be used by the service. * Regardless of the pageSize value, the response can include a partial list * and a caller should only rely on response's - * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} to determine if - * there are more instances left to be queried. + * {@link google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse.next_page_token|nextPageToken} + * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `nextPageToken` value returned from a previous - * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} request, if any. + * {@link google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools|azureNodePools.list} + * request, if any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2979,10 +3042,286 @@ export class AzureClustersClient { callSettings ) as AsyncIterable; } + /** + * 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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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. + * + * @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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#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 attachedCluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} attached_cluster + * @returns {string} Resource name string. + */ + attachedClusterPath( + project: string, + location: string, + attachedCluster: string + ) { + return this.pathTemplates.attachedClusterPathTemplate.render({ + project: project, + location: location, + attached_cluster: attachedCluster, + }); + } + + /** + * Parse the project from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).project; + } + + /** + * Parse the location from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).location; + } + + /** + * Parse the attached_cluster from AttachedCluster resource. + * + * @param {string} attachedClusterName + * A fully-qualified path representing AttachedCluster resource. + * @returns {string} A string representing the attached_cluster. + */ + matchAttachedClusterFromAttachedClusterName(attachedClusterName: string) { + return this.pathTemplates.attachedClusterPathTemplate.match( + attachedClusterName + ).attached_cluster; + } + + /** + * Return a fully-qualified attachedServerConfig resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + attachedServerConfigPath(project: string, location: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match( + attachedServerConfigName + ).project; + } + + /** + * Parse the location from AttachedServerConfig resource. + * + * @param {string} attachedServerConfigName + * A fully-qualified path representing AttachedServerConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAttachedServerConfigName(attachedServerConfigName: string) { + return this.pathTemplates.attachedServerConfigPathTemplate.match( + attachedServerConfigName + ).location; + } + /** * Return a fully-qualified awsCluster resource name string. * diff --git a/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_proto_list.json b/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_proto_list.json index b9a247daff1..288ec0e3d51 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_proto_list.json +++ b/packages/google-cloud-gkemulticloud/src/v1/azure_clusters_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/cloud/gkemulticloud/v1/attached_resources.proto", + "../../protos/google/cloud/gkemulticloud/v1/attached_service.proto", "../../protos/google/cloud/gkemulticloud/v1/aws_resources.proto", "../../protos/google/cloud/gkemulticloud/v1/aws_service.proto", "../../protos/google/cloud/gkemulticloud/v1/azure_resources.proto", diff --git a/packages/google-cloud-gkemulticloud/src/v1/gapic_metadata.json b/packages/google-cloud-gkemulticloud/src/v1/gapic_metadata.json index a4c4f5b5b12..11d19e83fb6 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/gapic_metadata.json +++ b/packages/google-cloud-gkemulticloud/src/v1/gapic_metadata.json @@ -5,6 +5,104 @@ "protoPackage": "google.cloud.gkemulticloud.v1", "libraryPackage": "@google-cloud/gkemulticloud", "services": { + "AttachedClusters": { + "clients": { + "grpc": { + "libraryClient": "AttachedClustersClient", + "rpcs": { + "GetAttachedCluster": { + "methods": [ + "getAttachedCluster" + ] + }, + "GetAttachedServerConfig": { + "methods": [ + "getAttachedServerConfig" + ] + }, + "GenerateAttachedClusterInstallManifest": { + "methods": [ + "generateAttachedClusterInstallManifest" + ] + }, + "CreateAttachedCluster": { + "methods": [ + "createAttachedCluster" + ] + }, + "UpdateAttachedCluster": { + "methods": [ + "updateAttachedCluster" + ] + }, + "ImportAttachedCluster": { + "methods": [ + "importAttachedCluster" + ] + }, + "DeleteAttachedCluster": { + "methods": [ + "deleteAttachedCluster" + ] + }, + "ListAttachedClusters": { + "methods": [ + "listAttachedClusters", + "listAttachedClustersStream", + "listAttachedClustersAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AttachedClustersClient", + "rpcs": { + "GetAttachedCluster": { + "methods": [ + "getAttachedCluster" + ] + }, + "GetAttachedServerConfig": { + "methods": [ + "getAttachedServerConfig" + ] + }, + "GenerateAttachedClusterInstallManifest": { + "methods": [ + "generateAttachedClusterInstallManifest" + ] + }, + "CreateAttachedCluster": { + "methods": [ + "createAttachedCluster" + ] + }, + "UpdateAttachedCluster": { + "methods": [ + "updateAttachedCluster" + ] + }, + "ImportAttachedCluster": { + "methods": [ + "importAttachedCluster" + ] + }, + "DeleteAttachedCluster": { + "methods": [ + "deleteAttachedCluster" + ] + }, + "ListAttachedClusters": { + "methods": [ + "listAttachedClusters", + "listAttachedClustersStream", + "listAttachedClustersAsync" + ] + } + } + } + } + }, "AwsClusters": { "clients": { "grpc": { diff --git a/packages/google-cloud-gkemulticloud/src/v1/index.ts b/packages/google-cloud-gkemulticloud/src/v1/index.ts index 1990c47bce3..fbd6ce70981 100644 --- a/packages/google-cloud-gkemulticloud/src/v1/index.ts +++ b/packages/google-cloud-gkemulticloud/src/v1/index.ts @@ -16,5 +16,6 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +export {AttachedClustersClient} from './attached_clusters_client'; export {AwsClustersClient} from './aws_clusters_client'; export {AzureClustersClient} from './azure_clusters_client'; diff --git a/packages/google-cloud-gkemulticloud/system-test/fixtures/sample/src/index.js b/packages/google-cloud-gkemulticloud/system-test/fixtures/sample/src/index.js index b374ffc2366..1f72c993048 100644 --- a/packages/google-cloud-gkemulticloud/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-gkemulticloud/system-test/fixtures/sample/src/index.js @@ -20,6 +20,7 @@ const gkemulticloud = require('@google-cloud/gkemulticloud'); function main() { + const attachedClustersClient = new gkemulticloud.AttachedClustersClient(); const awsClustersClient = new gkemulticloud.AwsClustersClient(); const azureClustersClient = new gkemulticloud.AzureClustersClient(); } diff --git a/packages/google-cloud-gkemulticloud/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-gkemulticloud/system-test/fixtures/sample/src/index.ts index 46eaddaadd6..a0577842f45 100644 --- a/packages/google-cloud-gkemulticloud/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-gkemulticloud/system-test/fixtures/sample/src/index.ts @@ -17,11 +17,15 @@ // ** All changes to this file may be overwritten. ** import { + AttachedClustersClient, AwsClustersClient, AzureClustersClient, } from '@google-cloud/gkemulticloud'; // check that the client class type name can be used +function doStuffWithAttachedClustersClient(client: AttachedClustersClient) { + client.close(); +} function doStuffWithAwsClustersClient(client: AwsClustersClient) { client.close(); } @@ -30,6 +34,9 @@ function doStuffWithAzureClustersClient(client: AzureClustersClient) { } function main() { + // check that the client instance can be created + const attachedClustersClient = new AttachedClustersClient(); + doStuffWithAttachedClustersClient(attachedClustersClient); // check that the client instance can be created const awsClustersClient = new AwsClustersClient(); doStuffWithAwsClustersClient(awsClustersClient); diff --git a/packages/google-cloud-gkemulticloud/test/gapic_attached_clusters_v1.ts b/packages/google-cloud-gkemulticloud/test/gapic_attached_clusters_v1.ts new file mode 100644 index 00000000000..b216a0e91ed --- /dev/null +++ b/packages/google-cloud-gkemulticloud/test/gapic_attached_clusters_v1.ts @@ -0,0 +1,2769 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as attachedclustersModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).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.AttachedClustersClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + attachedclustersModule.v1.AttachedClustersClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + attachedclustersModule.v1.AttachedClustersClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = attachedclustersModule.v1.AttachedClustersClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new attachedclustersModule.v1.AttachedClustersClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.attachedClustersStub, undefined); + await client.initialize(); + assert(client.attachedClustersStub); + }); + + it('has close method for the initialized client', done => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.attachedClustersStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.attachedClustersStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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('getAttachedCluster', () => { + it('invokes getAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ); + client.innerApiCalls.getAttachedCluster = + stubSimpleCall(expectedResponse); + const [response] = await client.getAttachedCluster(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ); + client.innerApiCalls.getAttachedCluster = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAttachedCluster( + request, + ( + err?: Error | null, + result?: protos.google.cloud.gkemulticloud.v1.IAttachedCluster | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedCluster with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAttachedCluster = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getAttachedCluster(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedCluster with closed client', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAttachedCluster(request), expectedError); + }); + }); + + describe('getAttachedServerConfig', () => { + it('invokes getAttachedServerConfig without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedServerConfig() + ); + client.innerApiCalls.getAttachedServerConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.getAttachedServerConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAttachedServerConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttachedServerConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedServerConfig without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedServerConfig() + ); + client.innerApiCalls.getAttachedServerConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAttachedServerConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.gkemulticloud.v1.IAttachedServerConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAttachedServerConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttachedServerConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedServerConfig with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAttachedServerConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getAttachedServerConfig(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getAttachedServerConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttachedServerConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttachedServerConfig with closed client', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getAttachedServerConfig(request), + expectedError + ); + }); + }); + + describe('generateAttachedClusterInstallManifest', () => { + it('invokes generateAttachedClusterInstallManifest without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse() + ); + client.innerApiCalls.generateAttachedClusterInstallManifest = + stubSimpleCall(expectedResponse); + const [response] = await client.generateAttachedClusterInstallManifest( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAttachedClusterInstallManifest without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse() + ); + client.innerApiCalls.generateAttachedClusterInstallManifest = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateAttachedClusterInstallManifest( + request, + ( + err?: Error | null, + result?: protos.google.cloud.gkemulticloud.v1.IGenerateAttachedClusterInstallManifestResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAttachedClusterInstallManifest with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateAttachedClusterInstallManifest = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.generateAttachedClusterInstallManifest(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateAttachedClusterInstallManifest as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateAttachedClusterInstallManifest with closed client', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.generateAttachedClusterInstallManifest(request), + expectedError + ); + }); + }); + + describe('createAttachedCluster', () => { + it('invokes createAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAttachedCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createAttachedCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAttachedCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAttachedCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachedCluster with call error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAttachedCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createAttachedCluster(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAttachedCluster with LRO error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAttachedCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createAttachedCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAttachedClusterProgress without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkCreateAttachedClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAttachedClusterProgress with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkCreateAttachedClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateAttachedCluster', () => { + it('invokes updateAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() + ); + request.attachedCluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', + ['attachedCluster', 'name'] + ); + request.attachedCluster.name = defaultValue1; + const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAttachedCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAttachedCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() + ); + request.attachedCluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', + ['attachedCluster', 'name'] + ); + request.attachedCluster.name = defaultValue1; + const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAttachedCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAttachedCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttachedCluster with call error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() + ); + request.attachedCluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', + ['attachedCluster', 'name'] + ); + request.attachedCluster.name = defaultValue1; + const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAttachedCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateAttachedCluster(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttachedCluster with LRO error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest() + ); + request.attachedCluster ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest', + ['attachedCluster', 'name'] + ); + request.attachedCluster.name = defaultValue1; + const expectedHeaderRequestParams = `attached_cluster.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAttachedCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateAttachedCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAttachedClusterProgress without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkUpdateAttachedClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAttachedClusterProgress with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkUpdateAttachedClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('importAttachedCluster', () => { + it('invokes importAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importAttachedCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.importAttachedCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importAttachedCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importAttachedCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.gkemulticloud.v1.IAttachedCluster, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAttachedCluster with call error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importAttachedCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.importAttachedCluster(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.importAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importAttachedCluster with LRO error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importAttachedCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.importAttachedCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.importAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportAttachedClusterProgress without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkImportAttachedClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportAttachedClusterProgress with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkImportAttachedClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteAttachedCluster', () => { + it('invokes deleteAttachedCluster without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAttachedCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAttachedCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachedCluster without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAttachedCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAttachedCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.gkemulticloud.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachedCluster with call error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAttachedCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteAttachedCluster(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAttachedCluster with LRO error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAttachedCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteAttachedCluster(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAttachedCluster as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAttachedCluster as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAttachedClusterProgress without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkDeleteAttachedClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAttachedClusterProgress with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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.checkDeleteAttachedClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listAttachedClusters', () => { + it('invokes listAttachedClusters without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + ]; + client.innerApiCalls.listAttachedClusters = + stubSimpleCall(expectedResponse); + const [response] = await client.listAttachedClusters(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAttachedClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAttachedClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachedClusters without error using callback', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + ]; + client.innerApiCalls.listAttachedClusters = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAttachedClusters( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.gkemulticloud.v1.IAttachedCluster[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAttachedClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAttachedClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachedClusters with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAttachedClusters = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAttachedClusters(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listAttachedClusters as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAttachedClusters as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAttachedClustersStream without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + ]; + client.descriptors.page.listAttachedClusters.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAttachedClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AttachedCluster[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.gkemulticloud.v1.AttachedCluster) => { + 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.listAttachedClusters.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAttachedClusters, request) + ); + assert( + (client.descriptors.page.listAttachedClusters.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAttachedClustersStream with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAttachedClusters.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAttachedClustersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkemulticloud.v1.AttachedCluster[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.gkemulticloud.v1.AttachedCluster) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAttachedClusters.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAttachedClusters, request) + ); + assert( + (client.descriptors.page.listAttachedClusters.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAttachedClusters without error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.AttachedCluster() + ), + ]; + client.descriptors.page.listAttachedClusters.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkemulticloud.v1.IAttachedCluster[] = + []; + const iterable = client.listAttachedClustersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAttachedClusters with error', async () => { + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAttachedClusters.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAttachedClustersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkemulticloud.v1.IAttachedCluster[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAttachedClusters.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAttachedClusters.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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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 attachedclustersModule.v1.AttachedClustersClient({ + 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('attachedCluster', () => { + const fakePath = '/rendered/path/attachedCluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + attached_cluster: 'attachedClusterValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedClusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.attachedClusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('attachedClusterPath', () => { + const result = client.attachedClusterPath( + 'projectValue', + 'locationValue', + 'attachedClusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAttachedClusterName', () => { + const result = client.matchProjectFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAttachedClusterName', () => { + const result = client.matchLocationFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAttachedClusterFromAttachedClusterName', () => { + const result = + client.matchAttachedClusterFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'attachedClusterValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('attachedServerConfig', () => { + const fakePath = '/rendered/path/attachedServerConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedServerConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.attachedServerConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('attachedServerConfigPath', () => { + const result = client.attachedServerConfigPath( + 'projectValue', + 'locationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAttachedServerConfigName', () => { + const result = + client.matchProjectFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAttachedServerConfigName', () => { + const result = + client.matchLocationFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('awsCluster', () => { + const fakePath = '/rendered/path/awsCluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + aws_cluster: 'awsClusterValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsClusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.awsClusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('awsClusterPath', () => { + const result = client.awsClusterPath( + 'projectValue', + 'locationValue', + 'awsClusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.awsClusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAwsClusterName', () => { + const result = client.matchProjectFromAwsClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAwsClusterName', () => { + const result = client.matchLocationFromAwsClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAwsClusterFromAwsClusterName', () => { + const result = client.matchAwsClusterFromAwsClusterName(fakePath); + assert.strictEqual(result, 'awsClusterValue'); + assert( + (client.pathTemplates.awsClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('awsNodePool', () => { + const fakePath = '/rendered/path/awsNodePool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + aws_cluster: 'awsClusterValue', + aws_node_pool: 'awsNodePoolValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsNodePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.awsNodePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('awsNodePoolPath', () => { + const result = client.awsNodePoolPath( + 'projectValue', + 'locationValue', + 'awsClusterValue', + 'awsNodePoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.awsNodePoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAwsNodePoolName', () => { + const result = client.matchProjectFromAwsNodePoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAwsNodePoolName', () => { + const result = client.matchLocationFromAwsNodePoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAwsClusterFromAwsNodePoolName', () => { + const result = client.matchAwsClusterFromAwsNodePoolName(fakePath); + assert.strictEqual(result, 'awsClusterValue'); + assert( + (client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAwsNodePoolFromAwsNodePoolName', () => { + const result = client.matchAwsNodePoolFromAwsNodePoolName(fakePath); + assert.strictEqual(result, 'awsNodePoolValue'); + assert( + (client.pathTemplates.awsNodePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('awsServerConfig', () => { + const fakePath = '/rendered/path/awsServerConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.awsServerConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.awsServerConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('awsServerConfigPath', () => { + const result = client.awsServerConfigPath( + 'projectValue', + 'locationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.awsServerConfigPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAwsServerConfigName', () => { + const result = client.matchProjectFromAwsServerConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAwsServerConfigName', () => { + const result = client.matchLocationFromAwsServerConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.awsServerConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('azureClient', () => { + const fakePath = '/rendered/path/azureClient'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + azure_client: 'azureClientValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureClientPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.azureClientPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('azureClientPath', () => { + const result = client.azureClientPath( + 'projectValue', + 'locationValue', + 'azureClientValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.azureClientPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAzureClientName', () => { + const result = client.matchProjectFromAzureClientName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAzureClientName', () => { + const result = client.matchLocationFromAzureClientName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAzureClientFromAzureClientName', () => { + const result = client.matchAzureClientFromAzureClientName(fakePath); + assert.strictEqual(result, 'azureClientValue'); + assert( + (client.pathTemplates.azureClientPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('azureCluster', () => { + const fakePath = '/rendered/path/azureCluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + azure_cluster: 'azureClusterValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureClusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.azureClusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('azureClusterPath', () => { + const result = client.azureClusterPath( + 'projectValue', + 'locationValue', + 'azureClusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.azureClusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAzureClusterName', () => { + const result = client.matchProjectFromAzureClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAzureClusterName', () => { + const result = client.matchLocationFromAzureClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAzureClusterFromAzureClusterName', () => { + const result = client.matchAzureClusterFromAzureClusterName(fakePath); + assert.strictEqual(result, 'azureClusterValue'); + assert( + (client.pathTemplates.azureClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('azureNodePool', () => { + const fakePath = '/rendered/path/azureNodePool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + azure_cluster: 'azureClusterValue', + azure_node_pool: 'azureNodePoolValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureNodePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.azureNodePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('azureNodePoolPath', () => { + const result = client.azureNodePoolPath( + 'projectValue', + 'locationValue', + 'azureClusterValue', + 'azureNodePoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.azureNodePoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAzureNodePoolName', () => { + const result = client.matchProjectFromAzureNodePoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAzureNodePoolName', () => { + const result = client.matchLocationFromAzureNodePoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAzureClusterFromAzureNodePoolName', () => { + const result = client.matchAzureClusterFromAzureNodePoolName(fakePath); + assert.strictEqual(result, 'azureClusterValue'); + assert( + (client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAzureNodePoolFromAzureNodePoolName', () => { + const result = client.matchAzureNodePoolFromAzureNodePoolName(fakePath); + assert.strictEqual(result, 'azureNodePoolValue'); + assert( + (client.pathTemplates.azureNodePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('azureServerConfig', () => { + const fakePath = '/rendered/path/azureServerConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.azureServerConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.azureServerConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('azureServerConfigPath', () => { + const result = client.azureServerConfigPath( + 'projectValue', + 'locationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.azureServerConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAzureServerConfigName', () => { + const result = client.matchProjectFromAzureServerConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.azureServerConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAzureServerConfigName', () => { + const result = client.matchLocationFromAzureServerConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.azureServerConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new attachedclustersModule.v1.AttachedClustersClient({ + 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) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-gkemulticloud/test/gapic_aws_clusters_v1.ts b/packages/google-cloud-gkemulticloud/test/gapic_aws_clusters_v1.ts index 6ab6232079c..49cc1808801 100644 --- a/packages/google-cloud-gkemulticloud/test/gapic_aws_clusters_v1.ts +++ b/packages/google-cloud-gkemulticloud/test/gapic_aws_clusters_v1.ts @@ -2610,8 +2610,441 @@ describe('v1.AwsClustersClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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 awsclustersModule.v1.AwsClustersClient({ + 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('attachedCluster', () => { + const fakePath = '/rendered/path/attachedCluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + attached_cluster: 'attachedClusterValue', + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedClusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.attachedClusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('attachedClusterPath', () => { + const result = client.attachedClusterPath( + 'projectValue', + 'locationValue', + 'attachedClusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAttachedClusterName', () => { + const result = client.matchProjectFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAttachedClusterName', () => { + const result = client.matchLocationFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAttachedClusterFromAttachedClusterName', () => { + const result = + client.matchAttachedClusterFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'attachedClusterValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('attachedServerConfig', () => { + const fakePath = '/rendered/path/attachedServerConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new awsclustersModule.v1.AwsClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedServerConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.attachedServerConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('attachedServerConfigPath', () => { + const result = client.attachedServerConfigPath( + 'projectValue', + 'locationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAttachedServerConfigName', () => { + const result = + client.matchProjectFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAttachedServerConfigName', () => { + const result = + client.matchLocationFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('awsCluster', () => { const fakePath = '/rendered/path/awsCluster'; const expectedParameters = { diff --git a/packages/google-cloud-gkemulticloud/test/gapic_azure_clusters_v1.ts b/packages/google-cloud-gkemulticloud/test/gapic_azure_clusters_v1.ts index 5bfdcdc623b..615dfb2ff77 100644 --- a/packages/google-cloud-gkemulticloud/test/gapic_azure_clusters_v1.ts +++ b/packages/google-cloud-gkemulticloud/test/gapic_azure_clusters_v1.ts @@ -3465,8 +3465,441 @@ describe('v1.AzureClustersClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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 azureclustersModule.v1.AzureClustersClient({ + 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('attachedCluster', () => { + const fakePath = '/rendered/path/attachedCluster'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + attached_cluster: 'attachedClusterValue', + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedClusterPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.attachedClusterPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('attachedClusterPath', () => { + const result = client.attachedClusterPath( + 'projectValue', + 'locationValue', + 'attachedClusterValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.attachedClusterPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAttachedClusterName', () => { + const result = client.matchProjectFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAttachedClusterName', () => { + const result = client.matchLocationFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAttachedClusterFromAttachedClusterName', () => { + const result = + client.matchAttachedClusterFromAttachedClusterName(fakePath); + assert.strictEqual(result, 'attachedClusterValue'); + assert( + (client.pathTemplates.attachedClusterPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('attachedServerConfig', () => { + const fakePath = '/rendered/path/attachedServerConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new azureclustersModule.v1.AzureClustersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attachedServerConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.attachedServerConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('attachedServerConfigPath', () => { + const result = client.attachedServerConfigPath( + 'projectValue', + 'locationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAttachedServerConfigName', () => { + const result = + client.matchProjectFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAttachedServerConfigName', () => { + const result = + client.matchLocationFromAttachedServerConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.attachedServerConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('awsCluster', () => { const fakePath = '/rendered/path/awsCluster'; const expectedParameters = { diff --git a/packages/google-cloud-gkemulticloud/webpack.config.js b/packages/google-cloud-gkemulticloud/webpack.config.js index a33f8ba7d49..f25a63690f4 100644 --- a/packages/google-cloud-gkemulticloud/webpack.config.js +++ b/packages/google-cloud-gkemulticloud/webpack.config.js @@ -17,8 +17,8 @@ const path = require('path'); module.exports = { entry: './src/index.ts', output: { - library: 'AwsClusters', - filename: './aws-clusters.js', + library: 'AttachedClusters', + filename: './attached-clusters.js', }, node: { child_process: 'empty',